Difference in map/set collection inference between analyzer and CFE #60367
Labels
area-dart-model
For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.
dart-model-analyzer-spec
Issues with the analyzer's implementation of the language spec
model-discrepancy
Discrepancies between analyzer and cfe
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Example code:
The CFE accepts the code as a map literal, and either throws or returns
1
.The analyzer reports:
The specification should end up in the case:
In those steps, the context type,
S
, is empty,?
, and there are no type arguments. There is precisely one leaf element,1: 2
, and the... throw "Badness"
spread element won't be looked at until we reach type inference.The text was updated successfully, but these errors were encountered: