You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[model] Keep Let expressions intact in the verifier
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 <[email protected]>
Commit-Queue: Chloe Stefantsova <[email protected]>
self::expect(0, let final core::Object? #t1 = CheckLibraryIsLoaded(prefix) in def::Extension|staticField);
19
-
self::expect(0, let final core::Object? #t2 = CheckLibraryIsLoaded(prefix) in def::Extension|get#property(0));
20
-
self::expect(42, let final core::Object? #t3 = CheckLibraryIsLoaded(prefix) in let final core::int #t4 = 0 in let final core::int #t5 = 42 in let final void #t6 = def::Extension|set#property(#t4, #t5) in #t5);
21
-
self::expect(84, let final core::Object? #t7 = CheckLibraryIsLoaded(prefix) in def::Extension|get#property(42));
22
-
self::expect(85, let final core::Object? #t8 = CheckLibraryIsLoaded(prefix) in def::Extension|method(43));
23
-
self::expect(42, let final core::Object? #t9 = CheckLibraryIsLoaded(prefix) in def::Extension|staticProperty);
24
-
self::expect(87, let final core::Object? #t10 = CheckLibraryIsLoaded(prefix) in def::Extension|staticProperty = 87);
25
-
self::expect(87, let final core::Object? #t11 = CheckLibraryIsLoaded(prefix) in def::Extension|staticMethod());
18
+
self::expect(0, let final dynamic #t1 = CheckLibraryIsLoaded(prefix) in def::Extension|staticField);
19
+
self::expect(0, let final dynamic #t2 = CheckLibraryIsLoaded(prefix) in def::Extension|get#property(0));
20
+
self::expect(42, let final dynamic #t3 = CheckLibraryIsLoaded(prefix) in let final core::int #t4 = 0 in let final core::int #t5 = 42 in let final void #t6 = def::Extension|set#property(#t4, #t5) in #t5);
21
+
self::expect(84, let final dynamic #t7 = CheckLibraryIsLoaded(prefix) in def::Extension|get#property(42));
22
+
self::expect(85, let final dynamic #t8 = CheckLibraryIsLoaded(prefix) in def::Extension|method(43));
23
+
self::expect(42, let final dynamic #t9 = CheckLibraryIsLoaded(prefix) in def::Extension|staticProperty);
24
+
self::expect(87, let final dynamic #t10 = CheckLibraryIsLoaded(prefix) in def::Extension|staticProperty = 87);
25
+
self::expect(87, let final dynamic #t11 = CheckLibraryIsLoaded(prefix) in def::Extension|staticMethod());
Copy file name to clipboardExpand all lines: pkg/front_end/testcases/extensions/missing_toplevel.dart.strong.transformed.expect
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ extension Extension on self::Class {
20
20
set setter = self::Extension|set#setter;
21
21
}
22
22
static field self::Class c = new self::Class::•();
23
-
static field dynamic missingGetter = let final self::Class #t1 = self::c in let final core::int #t2 = invalid-expression "pkg/front_end/testcases/extensions/missing_toplevel.dart:13:23: Error: The getter 'setter' isn't defined for the class 'Class'.
23
+
static field dynamic missingGetter = let final self::Class #t1 = self::c in let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/extensions/missing_toplevel.dart:13:23: Error: The getter 'setter' isn't defined for the class 'Class'.
24
24
- 'Class' is from 'pkg/front_end/testcases/extensions/missing_toplevel.dart'.
25
25
Try correcting the name to the name of an existing getter, or defining a getter or field named 'setter'.
0 commit comments