f749040450
Prior to this CL the CFE verifier would update the type of the variable in Let expressions from `dynamic` to the computed static type of the initializer. This CL removes the type update, making the .expect files reflect the CFE output more accurately. Additionally, a verification check is added to make sure the static type of the initializer is assignable to the type of the Let variable. Change-Id: I0b7b8f175bcb319678c323eb6440d93f1f384a85 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425500 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
12 lines
776 B
Plaintext
12 lines
776 B
Plaintext
Errors: {
|
|
org-dartlang-debug:synthetic_debug_expression:1:13: Error: Undefined name 'staticVar'.
|
|
globalVar + staticVar + 5
|
|
^^^^^^^^^
|
|
}
|
|
method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
|
|
return #lib1::globalVar.{dart.core::num::+}(invalid-expression "org-dartlang-debug:synthetic_debug_expression:1:13: Error: Undefined name 'staticVar'.\nglobalVar + staticVar + 5\n ^^^^^^^^^"){(dart.core::num) → invalid-type}{<invalid>}.+(5);
|
|
Errors: {
|
|
}
|
|
static method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic
|
|
return #lib1::globalVar.{dart.core::num::+}(#lib1::MyClass::staticVar){(dart.core::num) → dart.core::int}.{dart.core::num::+}(5){(dart.core::num) → dart.core::int};
|