NNBD Wrong or no error for different type getter/setter with the same basename #40333
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
NNBD
Issues related to NNBD Release
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
NNBD spec reads
In fact analyzer finds no issues in the code below
In the case when we do have an error, error message is wrong
Here we have
error - The return type of getter 'test' is 'num' which isn't assignable to the type 'int' of its setter 'test'.
But NNBD spec clearly says about 'subtyping', not about 'assignability'
Tested on
dartanalyzer version 2.8.0-dev.5.0
The text was updated successfully, but these errors were encountered: