Open
Description
The variables in scope are defined by a name and a type in the DartScope.definitions
map. There isn't a mechanism to convey the CFE lowering for late locals where they have been turned into multiple locals:
- backing store variable
- get method
- set method
- isSet local variable (optionally when the type is nullable)
Ideally we need to provide some kind of information packet that says all of these values are tied to the same orignal source definition of a late local variable so references to it when evaluating an expression can be transformed to match the orignal lowering.
Temporarily I am going to expose the backing store which gets us most of the way there in terms of functionality, but has some odd side effects in some cases if you try to evaluate an expression using the late variable before it has been initialized with a value.