| library; |
| import self as self; |
| import "dart:test" as test; |
| |
| import "dart:test"; |
| |
| static method test() → dynamic { |
| test::injectedMethod(); |
| new test::InjectedClass::•(); |
| new test::Class::•().{test::Class::injectedMethod}(){() → dynamic}; |
| } |
| static method main() → dynamic { |
| new test::Class::•(); |
| } |
| |
| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/inject_public/patch_lib.dart:8:7: Error: Can't inject public 'InjectedClass' into 'dart:test'. |
| // Make 'InjectedClass' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal"). |
| // class InjectedClass {} // Error |
| // ^ |
| // |
| // pkg/front_end/testcases/general/inject_public/patch_lib.dart:10:1: Error: Can't inject public 'injectedMethod' into 'dart:test'. |
| // Make 'injectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal"). |
| // injectedMethod() {} // Error |
| // ^ |
| // |
| // pkg/front_end/testcases/general/inject_public/patch_lib.dart:15:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'. |
| // Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal"). |
| // static staticInjectedMethod() {} // Error |
| // ^ |
| // |
| // pkg/front_end/testcases/general/inject_public/patch_lib.dart:21:10: Error: Can't inject public 'staticInjectedMethod' into 'dart:test'. |
| // Make 'staticInjectedMethod' private, or make sure injected library has "dart" scheme and is private (e.g. "dart:_internal"). |
| // static staticInjectedMethod() {} // Error |
| // ^ |
| // |
| import self as test; |
| import "dart:_internal" as _in; |
| import "dart:core" as core; |
| |
| import "dart:_internal"; |
| |
| @/* from org-dartlang-testcase:///patch_lib.dart */ #C1 |
| class Class extends core::Object { |
| synthetic constructor •() → test::Class |
| : super core::Object::•() |
| ; |
| method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {} |
| static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic {} |
| } |
| @/* from org-dartlang-testcase:///patch_lib.dart */ #C1 |
| class _PrivateClass extends core::Object { |
| synthetic constructor •() → test::_PrivateClass |
| : super core::Object::•() |
| ; |
| method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {} |
| static method /* from org-dartlang-testcase:///patch_lib.dart */ staticInjectedMethod() → dynamic {} |
| } |
| class InjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart |
| synthetic constructor •() → test::InjectedClass |
| : super core::Object::•() |
| ; |
| } |
| class _PrivateInjectedClass extends core::Object { // from org-dartlang-testcase:///patch_lib.dart |
| synthetic constructor •() → test::_PrivateInjectedClass |
| : super core::Object::•() |
| ; |
| method publicMethod() → dynamic {} |
| } |
| @/* from org-dartlang-testcase:///patch_lib.dart */ #C1 |
| extension Extension on core::int { |
| method injectedMethod = test::Extension|injectedMethod; |
| method tearoff injectedMethod = test::Extension|get#injectedMethod; |
| static method staticInjectedMethod = test::Extension|staticInjectedMethod; |
| } |
| @/* from org-dartlang-testcase:///patch_lib.dart */ #C1 |
| extension _PrivateExtension on core::int { |
| method injectedMethod = test::_PrivateExtension|injectedMethod; |
| method tearoff injectedMethod = test::_PrivateExtension|get#injectedMethod; |
| static method staticInjectedMethod = test::_PrivateExtension|staticInjectedMethod; |
| } |
| extension _PrivateInjectedExtension on core::int { // from org-dartlang-testcase:///patch_lib.dart |
| method publicMethod = test::_PrivateInjectedExtension|publicMethod; |
| method tearoff publicMethod = test::_PrivateInjectedExtension|get#publicMethod; |
| } |
| static method /* from org-dartlang-testcase:///patch_lib.dart */ injectedMethod() → dynamic {} |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|injectedMethod(lowered final core::int #this) → dynamic {} |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|get#injectedMethod(lowered final core::int #this) → () → dynamic |
| return () → dynamic => test::Extension|injectedMethod(#this); |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ Extension|staticInjectedMethod() → dynamic {} |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|publicMethod(lowered final core::int #this) → dynamic {} |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateInjectedExtension|get#publicMethod(lowered final core::int #this) → () → dynamic |
| return () → dynamic => test::_PrivateInjectedExtension|publicMethod(#this); |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|injectedMethod(lowered final core::int #this) → dynamic {} |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|get#injectedMethod(lowered final core::int #this) → () → dynamic |
| return () → dynamic => test::_PrivateExtension|injectedMethod(#this); |
| static extension-member method /* from org-dartlang-testcase:///patch_lib.dart */ _PrivateExtension|staticInjectedMethod() → dynamic {} |
| |
| constants { |
| #C1 = _in::_Patch {} |
| } |