Analyzer: Implementation of super-bounded types with null safety #43524
Labels
analyzer-spec
Issues with the analyzer's implementation of the language spec
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
With null safety, the spec update in dart-lang/language#1133 calls for the use of
Never
rather thanNull
during instantiation to bound, and during the checks for being a correctly super-bounded type.Some work was done on this in 744e34a, but the following example illustrates that the analyzer still uses
Null
:The response (with the analyzer from commit ecc87a1) is as follows:
This shows that the raw
A
is expanded by i2b toA<void Function(Null)>
, and then the bounds check fails.When
A
is expanded toA<void Function(Never)>
the type is correctly super-bounded and the rawA
is allowed, and this is the expected outcome after #1133.The text was updated successfully, but these errors were encountered: