When Foo extends Bar, then a method bar from Bar can be overriden in Foo with a potentially tighter return type (so if the original was nullable, this one can be non-nullable). The parameters of the method can be potentially looser (so if the original was non-nullable, this one can be nullable).
This also means the nullability data should be exported in the lockfile because when used for importing another package we'll use this data to determine the nullability of the subclasses.