Backporting .fromEnvironment updates: Get default values from element model, support hasEnvironment
#41050
Labels
legacy-area-analyzer
Use area-devexp instead.
NNBD
Issues related to NNBD Release
P1
A high priority bug; for example, a single project is unusable or has many test failures
Cf. breaking change #40678, https://dart-review.googlesource.com/c/sdk/+/139286 introduced
bool.hasEnvironment
into the sdk/sdk_nnbd.The next step would be to make the analyzer obtain the default value for the named parameter
defaultValue
of thebool
,int
,String
constructors namedfromEnvironment
from the element model, such that it would work with both the sdk and the sdk_nnbd defaults without special casing.Next again, evaluation of constant expressions of the form
const bool.hasEnvironment(...)
should be implemented, and this would then make the testslanguage{,_2}/bool/has_environment_{,not_new_}test.dart
succeed.@stereotype441, can you help finding a way to fit this into the analyzer team work plan?
The text was updated successfully, but these errors were encountered: