| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extensions/deferred_explicit_access.dart:5:1: Error: Extension 'Extension' cannot be imported through a deferred import. |
| // Try adding the `hide Extension` to the import. |
| // import 'deferred_explicit_access_lib.dart' deferred as prefix; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "deferred_explicit_access_lib.dart" as def; |
| |
| import "org-dartlang-testcase:///deferred_explicit_access_lib.dart" deferred as prefix; |
| |
| static method main() → dynamic async /* futureValueType= dynamic */ { |
| await LoadLibrary(prefix); |
| self::expect(0, let final core::Object* #t1 = CheckLibraryIsLoaded(prefix) in def::Extension|staticField); |
| self::expect(0, let final core::Object* #t2 = CheckLibraryIsLoaded(prefix) in def::Extension|get#property(0)); |
| 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); |
| self::expect(84, let final core::Object* #t7 = CheckLibraryIsLoaded(prefix) in def::Extension|get#property(42)); |
| self::expect(85, let final core::Object* #t8 = CheckLibraryIsLoaded(prefix) in def::Extension|method(43)); |
| self::expect(42, let final core::Object* #t9 = CheckLibraryIsLoaded(prefix) in def::Extension|staticProperty); |
| self::expect(87, let final core::Object* #t10 = CheckLibraryIsLoaded(prefix) in def::Extension|staticProperty = 87); |
| self::expect(87, let final core::Object* #t11 = CheckLibraryIsLoaded(prefix) in def::Extension|staticMethod()); |
| } |
| static method expect(dynamic expected, dynamic actual) → dynamic { |
| if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual)) |
| throw "Expected ${expected}, actual ${actual}"; |
| } |
| |
| library /*isNonNullableByDefault*/; |
| import self as def; |
| import "dart:core" as core; |
| |
| extension Extension on core::int { |
| static field staticField = def::Extension|staticField; |
| static get staticProperty = get def::Extension|staticProperty; |
| static method staticMethod = def::Extension|staticMethod; |
| get property = def::Extension|get#property; |
| method method = def::Extension|method; |
| tearoff method = def::Extension|get#method; |
| static set staticProperty = set def::Extension|staticProperty; |
| set property = def::Extension|set#property; |
| } |
| static field core::int Extension|staticField = 0; |
| static field core::int topLevelField = def::Extension|staticField; |
| static get Extension|staticProperty() → core::int |
| return def::Extension|staticField; |
| static set Extension|staticProperty(core::int value) → void { |
| def::Extension|staticField = value; |
| } |
| static method Extension|staticMethod() → core::int |
| return def::Extension|staticField; |
| static method Extension|get#property(lowered final core::int #this) → core::int |
| return #this.{core::num::+}(def::Extension|staticField){(core::num) → core::int}; |
| static method Extension|set#property(lowered final core::int #this, core::int value) → void { |
| def::Extension|staticField = value; |
| } |
| static method Extension|method(lowered final core::int #this) → core::int |
| return #this.{core::num::+}(def::Extension|staticField){(core::num) → core::int}; |
| static method Extension|get#method(lowered final core::int #this) → () → core::int |
| return () → core::int => def::Extension|method(#this); |
| static get topLevelProperty() → core::int |
| return def::Extension|staticField; |
| static set topLevelProperty(core::int value) → void { |
| def::Extension|staticField = value; |
| } |
| static method topLevelMethod() → dynamic |
| return def::Extension|staticField; |
| |
| |
| Extra constant evaluation status: |
| Evaluated: VariableGet @ org-dartlang-testcase:///deferred_explicit_access.dart:12:31 -> IntConstant(0) |
| Evaluated: VariableGet @ org-dartlang-testcase:///deferred_explicit_access.dart:12:45 -> IntConstant(42) |
| Evaluated: VariableGet @ org-dartlang-testcase:///deferred_explicit_access.dart:12:45 -> IntConstant(42) |
| Extra constant evaluation: evaluated: 68, effectively constant: 3 |