Hi folks,
As part of our preparation for NNBD, I ran into an issue where I declared a getter as nullable (because it could be called before underlying data was initialized) and the corresponding setter as taking a non-nullable argument (because it sets the underlying data, and we don't want it to be able to be set to the uninitialized value). To my surprised, this caused an analysis error saying that the getter's return type had to be a subtype of the setter's argument type.
Can you give some context around why this requirement is in place? It's forcing me to write a runtime check for something that it seems like I should be able to express in the type system.
Thanks!
- Natalie