blob: 04554a5243a2231c184ab86e369098247f728dc9 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/macros/class_members_lib.dart:9:8: Error: Member 'existingMethod' conflicts with an existing member of the same name in the augmented class.
// Try changing the name of the member or adding an 'augment' modifier.
// void existingMethod() {
// ^^^^^^^^^^^^^^
// pkg/front_end/testcases/macros/class_members.dart:10:8: Context: This is the existing member.
// void existingMethod() {
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:15:16: Error: Augmentation member 'orphanedMethod' doesn't match a member in the augmented class.
// Try changing the name to an existing member or removing the 'augment' modifier.
// augment void orphanedMethod() {
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:33:15: Error: Member 'staticExistingMethod' conflicts with an existing member of the same name in the augmented class.
// Try changing the name of the member or adding an 'augment' modifier.
// static void staticExistingMethod() {
// ^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/macros/class_members.dart:22:15: Context: This is the existing member.
// static void staticExistingMethod() {
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:39:23: Error: Augmentation member 'staticOrphanedMethod' doesn't match a member in the augmented class.
// Try changing the name to an existing member or removing the 'augment' modifier.
// augment static void staticOrphanedMethod() {
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:21:12: Error: Member 'existingSetter' conflicts with an existing member of the same name in the augmented class.
// Try changing the name of the member or adding an 'augment' modifier.
// void set existingSetter(_) {
// ^^^^^^^^^^^^^^
// pkg/front_end/testcases/macros/class_members.dart:16:12: Context: This is the existing member.
// void set existingSetter(_) {
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:27:20: Error: Augmentation member 'orphanedSetter' doesn't match a member in the augmented class.
// Try changing the name to an existing member or removing the 'augment' modifier.
// augment void set orphanedSetter(_) {
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:45:19: Error: Member 'staticExistingSetter' conflicts with an existing member of the same name in the augmented class.
// Try changing the name of the member or adding an 'augment' modifier.
// static void set staticExistingSetter(_) {
// ^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/macros/class_members.dart:28:19: Context: This is the existing member.
// static void set staticExistingSetter(_) {
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:51:27: Error: Augmentation member 'staticOrphanedSetter' doesn't match a member in the augmented class.
// Try changing the name to an existing member or removing the 'augment' modifier.
// augment static void set staticOrphanedSetter(_) {
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:60:8: Error: Member 'existingMethod' conflicts with an existing member of the same name in the augmented class.
// Try changing the name of the member or adding an 'augment' modifier.
// void existingMethod() {
// ^^^^^^^^^^^^^^
// pkg/front_end/testcases/macros/class_members_part.dart:8:8: Context: This is the existing member.
// void existingMethod() {
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:66:16: Error: Augmentation member 'orphanedMethod' doesn't match a member in the augmented class.
// Try changing the name to an existing member or removing the 'augment' modifier.
// augment void orphanedMethod() {
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:84:15: Error: Member 'staticExistingMethod' conflicts with an existing member of the same name in the augmented class.
// Try changing the name of the member or adding an 'augment' modifier.
// static void staticExistingMethod() {
// ^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/macros/class_members_part.dart:20:15: Context: This is the existing member.
// static void staticExistingMethod() {
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:90:23: Error: Augmentation member 'staticOrphanedMethod' doesn't match a member in the augmented class.
// Try changing the name to an existing member or removing the 'augment' modifier.
// augment static void staticOrphanedMethod() {
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:72:12: Error: Member 'existingSetter' conflicts with an existing member of the same name in the augmented class.
// Try changing the name of the member or adding an 'augment' modifier.
// void set existingSetter(_) {
// ^^^^^^^^^^^^^^
// pkg/front_end/testcases/macros/class_members_part.dart:14:12: Context: This is the existing member.
// void set existingSetter(_) {
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:78:20: Error: Augmentation member 'orphanedSetter' doesn't match a member in the augmented class.
// Try changing the name to an existing member or removing the 'augment' modifier.
// augment void set orphanedSetter(_) {
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:96:19: Error: Member 'staticExistingSetter' conflicts with an existing member of the same name in the augmented class.
// Try changing the name of the member or adding an 'augment' modifier.
// static void set staticExistingSetter(_) {
// ^^^^^^^^^^^^^^^^^^^^
// pkg/front_end/testcases/macros/class_members_part.dart:26:19: Context: This is the existing member.
// static void set staticExistingSetter(_) {
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members_lib.dart:102:27: Error: Augmentation member 'staticOrphanedSetter' doesn't match a member in the augmented class.
// Try changing the name to an existing member or removing the 'augment' modifier.
// augment static void set staticOrphanedSetter(_) {
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members.dart:40:10: Error: Member not found: 'Class1.staticOrphanedMethod'.
// Class1.staticOrphanedMethod();
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members.dart:41:10: Error: Setter not found: 'staticOrphanedSetter'.
// Class1.staticOrphanedSetter = 0;
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members.dart:42:10: Error: Member not found: 'Class2.staticOrphanedMethod'.
// Class2.staticOrphanedMethod();
// ^^^^^^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/macros/class_members.dart:43:10: Error: Setter not found: 'staticOrphanedSetter'.
// Class2.staticOrphanedSetter = 0;
// ^^^^^^^^^^^^^^^^^^^^
//
import self as self;
import "dart:core" as core;
import "org-dartlang-testcase:///class_members.dart";
part class_members_part.dart;
class Class1 extends core::Object {
synthetic constructor •() self::Class1
: super core::Object::•()
;
method existingMethod() void {
core::print("existingMethod-origin");
}
method /* from org-dartlang-testcase:///class_members_lib.dart */ augmentedMethod() void {
core::print("augmentedMethod");
}
set existingSetter(dynamic _) void {
core::print("existingSetter-origin");
}
set /* from org-dartlang-testcase:///class_members_lib.dart */ augmentedSetter(dynamic _) void {
core::print("augmentedSetter");
}
static method staticExistingMethod() void {
core::print("staticExistingMethod-origin");
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ staticAugmentedMethod() void {
core::print("staticAugmentedMethod");
}
static set staticExistingSetter(dynamic _) void {
core::print("staticExistingSetter-origin");
}
static set /* from org-dartlang-testcase:///class_members_lib.dart */ staticAugmentedSetter(dynamic _) void {
core::print("staticAugmentedSetter");
}
method /* from org-dartlang-testcase:///class_members_lib.dart */ injectedMethod() void {
core::print("injectedMethod");
}
method /* from org-dartlang-testcase:///class_members_lib.dart */ orphanedMethod() void {
core::print("orphanedMethod");
}
set /* from org-dartlang-testcase:///class_members_lib.dart */ injectedSetter(dynamic _) void {
core::print("injectedSetter");
}
set /* from org-dartlang-testcase:///class_members_lib.dart */ orphanedSetter(dynamic _) void {
core::print("orphanedSetter");
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ staticExistingMethod#1() → void {
core::print("staticExistingMethod-duplicate");
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ staticInjectedMethod() void {
core::print("staticInjectedMethod");
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ staticOrphanedMethod() void {
core::print("staticOrphanedMethod");
}
static set /* from org-dartlang-testcase:///class_members_lib.dart */ staticExistingSetter#1(dynamic _) → void {
core::print("staticExistingSetter-duplicate");
}
static set /* from org-dartlang-testcase:///class_members_lib.dart */ staticInjectedSetter(dynamic _) void {
core::print("staticInjectedSetter");
}
static set /* from org-dartlang-testcase:///class_members_lib.dart */ staticOrphanedSetter(dynamic _) void {
core::print("staticOrphanedSetter");
}
}
class Class2 extends core::Object { // from org-dartlang-testcase:///class_members_part.dart
synthetic constructor •() self::Class2
: super core::Object::•()
;
method /* from org-dartlang-testcase:///class_members_lib.dart */ injectedMethod() void {
core::print("injectedMethod");
}
method /* from org-dartlang-testcase:///class_members_lib.dart */ orphanedMethod() void {
core::print("orphanedMethod");
}
set /* from org-dartlang-testcase:///class_members_lib.dart */ injectedSetter(dynamic _) void {
core::print("injectedSetter");
}
set /* from org-dartlang-testcase:///class_members_lib.dart */ orphanedSetter(dynamic _) void {
core::print("orphanedSetter");
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ staticExistingMethod#1() → void {
core::print("staticExistingMethod-duplicate");
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ staticInjectedMethod() void {
core::print("staticInjectedMethod");
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ staticOrphanedMethod() void {
core::print("staticOrphanedMethod");
}
static set /* from org-dartlang-testcase:///class_members_lib.dart */ staticExistingSetter#1(dynamic _) → void {
core::print("staticExistingSetter-duplicate");
}
static set /* from org-dartlang-testcase:///class_members_lib.dart */ staticInjectedSetter(dynamic _) void {
core::print("staticInjectedSetter");
}
static set /* from org-dartlang-testcase:///class_members_lib.dart */ staticOrphanedSetter(dynamic _) void {
core::print("staticOrphanedSetter");
}
method existingMethod() void {
core::print("existingMethod-origin");
}
method /* from org-dartlang-testcase:///class_members_lib.dart */ augmentedMethod() void {
core::print("augmentedMethod");
}
set existingSetter(dynamic _) void {
core::print("existingSetter-origin");
}
set /* from org-dartlang-testcase:///class_members_lib.dart */ augmentedSetter(dynamic _) void {
core::print("augmentedSetter");
}
static method staticExistingMethod() void {
core::print("staticExistingMethod-origin");
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ staticAugmentedMethod() void {
core::print("staticAugmentedMethod");
}
static set staticExistingSetter(dynamic _) void {
core::print("staticExistingSetter-origin");
}
static set /* from org-dartlang-testcase:///class_members_lib.dart */ staticAugmentedSetter(dynamic _) void {
core::print("staticAugmentedSetter");
}
}
static method test(self::Class1 c1, self::Class2 c2) dynamic {
c1.{self::Class1::orphanedMethod}(){() void};
c1.{self::Class1::orphanedSetter} = 0;
c2.{self::Class2::orphanedMethod}(){() void};
c2.{self::Class2::orphanedSetter} = 0;
invalid-expression "pkg/front_end/testcases/macros/class_members.dart:40:10: Error: Member not found: 'Class1.staticOrphanedMethod'.
Class1.staticOrphanedMethod();
^^^^^^^^^^^^^^^^^^^^";
invalid-expression "pkg/front_end/testcases/macros/class_members.dart:41:10: Error: Setter not found: 'staticOrphanedSetter'.
Class1.staticOrphanedSetter = 0;
^^^^^^^^^^^^^^^^^^^^";
invalid-expression "pkg/front_end/testcases/macros/class_members.dart:42:10: Error: Member not found: 'Class2.staticOrphanedMethod'.
Class2.staticOrphanedMethod();
^^^^^^^^^^^^^^^^^^^^";
invalid-expression "pkg/front_end/testcases/macros/class_members.dart:43:10: Error: Setter not found: 'staticOrphanedSetter'.
Class2.staticOrphanedSetter = 0;
^^^^^^^^^^^^^^^^^^^^";
}
static method main() dynamic {
self::Class1 c1 = new self::Class1::•();
c1.{self::Class1::augmentedMethod}(){() void};
c1.{self::Class1::injectedMethod}(){() void};
c1.{self::Class1::existingMethod}(){() void};
self::Class1::staticAugmentedMethod();
self::Class1::staticInjectedMethod();
self::Class1::staticExistingMethod();
c1.{self::Class1::augmentedSetter} = 0;
c1.{self::Class1::injectedSetter} = 0;
c1.{self::Class1::existingSetter} = 0;
self::Class1::staticAugmentedSetter = 0;
self::Class1::staticInjectedSetter = 0;
self::Class1::staticExistingSetter = 0;
self::Class2 c2 = new self::Class2::•();
c2.{self::Class2::augmentedMethod}(){() void};
c2.{self::Class2::injectedMethod}(){() void};
c2.{self::Class2::existingMethod}(){() void};
self::Class2::staticAugmentedMethod();
self::Class2::staticInjectedMethod();
self::Class2::staticExistingMethod();
c2.{self::Class2::augmentedSetter} = 0;
c2.{self::Class2::injectedSetter} = 0;
c2.{self::Class2::existingSetter} = 0;
self::Class2::staticAugmentedSetter = 0;
self::Class2::staticInjectedSetter = 0;
self::Class2::staticExistingSetter = 0;
self::injectedMethod(c1, c2);
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ augmentTest(self::Class1 c1, self::Class2 c2) void {
c1.{self::Class1::orphanedMethod}(){() void};
c1.{self::Class1::orphanedSetter} = 0;
c2.{self::Class2::orphanedMethod}(){() void};
c2.{self::Class2::orphanedSetter} = 0;
self::Class1::staticOrphanedMethod();
self::Class1::staticOrphanedSetter = 0;
self::Class2::staticOrphanedMethod();
self::Class2::staticOrphanedSetter = 0;
}
static method /* from org-dartlang-testcase:///class_members_lib.dart */ injectedMethod(self::Class1 c1, self::Class2 c2) void {
c1.{self::Class1::augmentedMethod}(){() void};
c1.{self::Class1::injectedMethod}(){() void};
c1.{self::Class1::existingMethod}(){() void};
self::Class1::staticAugmentedMethod();
self::Class1::staticInjectedMethod();
self::Class1::staticExistingMethod#1();
c1.{self::Class1::augmentedSetter} = 0;
c1.{self::Class1::injectedSetter} = 0;
c1.{self::Class1::existingSetter} = 0;
self::Class1::staticAugmentedSetter = 0;
self::Class1::staticInjectedSetter = 0;
self::Class1::staticExistingSetter#1 = 0;
c2.{self::Class2::augmentedMethod}(){() void};
c2.{self::Class2::injectedMethod}(){() void};
c2.{self::Class2::existingMethod}(){() void};
self::Class2::staticAugmentedMethod();
self::Class2::staticInjectedMethod();
self::Class2::staticExistingMethod#1();
c2.{self::Class2::augmentedSetter} = 0;
c2.{self::Class2::injectedSetter} = 0;
c2.{self::Class2::existingSetter} = 0;
self::Class2::staticAugmentedSetter = 0;
self::Class2::staticInjectedSetter = 0;
self::Class2::staticExistingSetter#1 = 0;
}