| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extensions/patch/main.dart:9:5: Error: The method 'method2' isn't defined for the class 'int'. |
| // Try correcting the name to the name of an existing method, or defining a method named 'method2'. |
| // 0.method2(); |
| // ^^^^^^^ |
| // |
| import self as self; |
| import "dart:test" as test; |
| |
| import "dart:test"; |
| |
| static method test() → dynamic { |
| test::IntExtension|method1(0); |
| invalid-expression "pkg/front_end/testcases/extensions/patch/main.dart:9:5: Error: The method 'method2' isn't defined for the class 'int'. |
| Try correcting the name to the name of an existing method, or defining a method named 'method2'. |
| 0.method2(); |
| ^^^^^^^" in 0{<unresolved>}.method2(); |
| } |
| |
| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extensions/patch/origin_lib.dart:11:5: Error: The method 'method2' isn't defined for the class 'int'. |
| // Try correcting the name to the name of an existing method, or defining a method named 'method2'. |
| // 0.method2(); |
| // ^^^^^^^ |
| // |
| import self as test; |
| import "dart:_internal" as _in; |
| import "dart:core" as core; |
| |
| import "dart:_internal"; |
| |
| @#C1 |
| extension IntExtension on core::int { |
| method method2 = test::IntExtension|method2; |
| method tearoff method2 = test::IntExtension|get#method2; |
| method method1 = test::IntExtension|method1; |
| method tearoff method1 = test::IntExtension|get#method1; |
| } |
| @#C1 |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|method1(lowered final core::int #this) → core::int |
| return 42; |
| static extension-member method IntExtension|get#method1(lowered final core::int #this) → () → core::int |
| return () → core::int => test::IntExtension|method1(#this); |
| static method method1() → dynamic { |
| test::IntExtension|method1(0); |
| invalid-expression "pkg/front_end/testcases/extensions/patch/origin_lib.dart:11:5: Error: The method 'method2' isn't defined for the class 'int'. |
| Try correcting the name to the name of an existing method, or defining a method named 'method2'. |
| 0.method2(); |
| ^^^^^^^" in 0{<unresolved>}.method2(); |
| } |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|method2(lowered final core::int #this) → core::int |
| return 43; |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ IntExtension|get#method2(lowered final core::int #this) → () → core::int |
| return () → core::int => test::IntExtension|method2(#this); |
| static method /* from org-dartlang-testcase:///patch_lib.dart */ _method2() → dynamic { |
| test::IntExtension|method1(0); |
| test::IntExtension|method2(0); |
| } |
| |
| constants { |
| #C1 = _in::_Patch {} |
| } |