CFE and member conflict rules

See https://github.com/dart-lang/sdk/issues/32613
and https://github.com/dart-lang/sdk/issues/33235#issue-326617285

Bug: #32613, #33235, #33237
Change-Id: I0d1432185b6811137e31135ac2c7f58c4de2de6c
Reviewed-on: https://dart-review.googlesource.com/64500
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
index 85added..0c770a5 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
@@ -114,6 +114,30 @@
 
   @override
   @failingTest
+  test_conflictingConstructorNameAndMember_field() async {
+    // Expected 1 errors of type CompileTimeErrorCode.CONFLICTS_WITH_CONSTRUCTOR, found 0;
+    //          1 errors of type CompileTimeErrorCode.CONFLICTS_WITH_MEMBER, found 0
+    await super.test_conflictingConstructorNameAndMember_field();
+  }
+
+  @override
+  @failingTest
+  test_conflictingConstructorNameAndMember_getter() async {
+    // Expected 1 errors of type CompileTimeErrorCode.CONFLICTS_WITH_CONSTRUCTOR, found 0;
+    //          1 errors of type CompileTimeErrorCode.CONFLICTS_WITH_MEMBER, found 0
+    await super.test_conflictingConstructorNameAndMember_getter();
+  }
+
+  @override
+  @failingTest
+  test_conflictingConstructorNameAndMember_method() async {
+    // Expected 1 errors of type CompileTimeErrorCode.CONFLICTS_WITH_CONSTRUCTOR, found 0;
+    //          1 errors of type CompileTimeErrorCode.CONFLICTS_WITH_MEMBER, found 0
+    await super.test_conflictingConstructorNameAndMember_method();
+  }
+
+  @override
+  @failingTest
   test_conflictingGenericInterfaces_hierarchyLoop() =>
       super.test_conflictingGenericInterfaces_hierarchyLoop();
 
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
index 6e1045b..6135e72 100644
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
@@ -158,6 +158,7 @@
     constructors.forEach((String name, Declaration constructor) {
       Declaration member = scopeBuilder[name];
       if (member == null) return;
+      if (!member.isStatic) return;
       // TODO(ahe): Revisit these messages. It seems like the last two should
       // be `context` parameter to this message.
       addCompileTimeError(templateConflictsWithMember.withArguments(name),
diff --git a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
index ddcd9cf..02395c0 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
@@ -906,6 +906,20 @@
                           conflict.fileUri, conflict.fileOffset, noLength)
                     ]);
               }
+            } else {
+              // If it's a setter conflicting with a method and both are
+              // declared in the same class, it hasn't been signaled as a
+              // duplicated definition so it's reported here.
+              library.addProblem(
+                  messageDeclaredMemberConflictsWithInheritedMember,
+                  member.fileOffset,
+                  noLength,
+                  member.fileUri,
+                  context: [
+                    messageDeclaredMemberConflictsWithInheritedMemberCause
+                        .withLocation(
+                            conflict.fileUri, conflict.fileOffset, noLength)
+                  ]);
             }
             return;
           }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.expect
index 081ba63..26812a7 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.expect
@@ -1,3 +1,9 @@
+// Errors:
+//
+// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Error: Can't declare a member that conflicts with an inherited one.
+//   void foo(int x) {}
+//        ^
+
 library;
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.transformed.expect
index 081ba63..26812a7 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.transformed.expect
@@ -1,3 +1,9 @@
+// Errors:
+//
+// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Error: Can't declare a member that conflicts with an inherited one.
+//   void foo(int x) {}
+//        ^
+
 library;
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/rasta/super.dart.strong.expect b/pkg/front_end/testcases/rasta/super.dart.strong.expect
index 4d36a7b..d4f9d08 100644
--- a/pkg/front_end/testcases/rasta/super.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/super.dart.strong.expect
@@ -1,5 +1,9 @@
 // Errors:
 //
+// pkg/front_end/testcases/rasta/super.dart:26:8: Error: Can't declare a member that conflicts with an inherited one.
+//   void n() {}
+//        ^
+//
 // pkg/front_end/testcases/rasta/super.dart:43:5: Error: '+' is not a prefix operator.
 // Try removing '+'.
 //     +super;
diff --git a/pkg/front_end/testcases/regress/issue_31299.dart.direct.expect b/pkg/front_end/testcases/regress/issue_31299.dart.direct.expect
index 2af900e..30d4403 100644
--- a/pkg/front_end/testcases/regress/issue_31299.dart.direct.expect
+++ b/pkg/front_end/testcases/regress/issue_31299.dart.direct.expect
@@ -1,13 +1,3 @@
-// Errors:
-//
-// pkg/front_end/testcases/regress/issue_31299.dart:10:3: Error: Conflicts with member 'foo'.
-//   A.foo() : m = 2;
-//   ^
-//
-// pkg/front_end/testcases/regress/issue_31299.dart:11:7: Error: Conflicts with constructor 'A.foo'.
-//   int foo(int a, int b) => a + b * m;
-//       ^
-
 library;
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_31299.dart.direct.transformed.expect b/pkg/front_end/testcases/regress/issue_31299.dart.direct.transformed.expect
index 2af900e..30d4403 100644
--- a/pkg/front_end/testcases/regress/issue_31299.dart.direct.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_31299.dart.direct.transformed.expect
@@ -1,13 +1,3 @@
-// Errors:
-//
-// pkg/front_end/testcases/regress/issue_31299.dart:10:3: Error: Conflicts with member 'foo'.
-//   A.foo() : m = 2;
-//   ^
-//
-// pkg/front_end/testcases/regress/issue_31299.dart:11:7: Error: Conflicts with constructor 'A.foo'.
-//   int foo(int a, int b) => a + b * m;
-//       ^
-
 library;
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_31299.dart.strong.expect b/pkg/front_end/testcases/regress/issue_31299.dart.strong.expect
index 8a7471d..33b03d6 100644
--- a/pkg/front_end/testcases/regress/issue_31299.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_31299.dart.strong.expect
@@ -1,13 +1,5 @@
 // Errors:
 //
-// pkg/front_end/testcases/regress/issue_31299.dart:10:3: Error: Conflicts with member 'foo'.
-//   A.foo() : m = 2;
-//   ^
-//
-// pkg/front_end/testcases/regress/issue_31299.dart:11:7: Error: Conflicts with constructor 'A.foo'.
-//   int foo(int a, int b) => a + b * m;
-//       ^
-//
 // pkg/front_end/testcases/regress/issue_31299.dart:18:7: Error: Too many positional arguments: 0 allowed, 2 given.
 //   new A.foo(1, 2);
 //       ^
diff --git a/tests/co19/co19-kernel.status b/tests/co19/co19-kernel.status
index c28c644..df66ba2 100644
--- a/tests/co19/co19-kernel.status
+++ b/tests/co19/co19-kernel.status
@@ -58,8 +58,13 @@
 Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t02: MissingCompileTimeError
 Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02: MissingCompileTimeError
 Language/Classes/Constructors/Generative_Constructors/static_type_t01: CompileTimeError
+Language/Classes/Constructors/name_t01: MissingCompileTimeError
+Language/Classes/Constructors/name_t02: MissingCompileTimeError
+Language/Classes/Constructors/name_t03: MissingCompileTimeError
 Language/Classes/Getters/static_getter_t01: CompileTimeError
+Language/Classes/Instance_Methods/same_name_setter_t01: CompileTimeError
 Language/Classes/Instance_Methods/same_name_setter_t02: CompileTimeError # Issue 14736
+Language/Classes/Setters/name_t02: CompileTimeError
 Language/Classes/Setters/name_t03: CompileTimeError
 Language/Classes/Setters/name_t04: CompileTimeError
 Language/Classes/Setters/name_t06: CompileTimeError
@@ -89,6 +94,9 @@
 Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02: MissingCompileTimeError
 Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t02: MissingCompileTimeError
 Language/Classes/Constructors/Generative_Constructors/initializing_formals_execution_t02: MissingCompileTimeError
+Language/Classes/Constructors/name_t01: MissingCompileTimeError
+Language/Classes/Constructors/name_t02: MissingCompileTimeError
+Language/Classes/Constructors/name_t03: MissingCompileTimeError
 Language/Classes/Getters/same_name_method_t03: MissingCompileTimeError
 Language/Classes/Getters/same_name_method_t04: MissingCompileTimeError
 Language/Classes/Getters/same_name_method_t05: MissingCompileTimeError
diff --git a/tests/co19_2/co19_2-kernel.status b/tests/co19_2/co19_2-kernel.status
index 956726a..245b238 100644
--- a/tests/co19_2/co19_2-kernel.status
+++ b/tests/co19_2/co19_2-kernel.status
@@ -31,6 +31,9 @@
 Language/Classes/Constructors/Generative_Constructors/execution_t07: MissingCompileTimeError
 Language/Classes/Constructors/Generative_Constructors/execution_t12: MissingCompileTimeError
 Language/Classes/Constructors/Generative_Constructors/initializers_t15: CompileTimeError
+Language/Classes/Constructors/name_t01: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Constructors/name_t02: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Constructors/name_t03: MissingCompileTimeError # Legal, see #33235
 Language/Classes/Getters/instance_getter_t01: MissingCompileTimeError
 Language/Classes/Getters/instance_getter_t02: MissingCompileTimeError
 Language/Classes/Getters/instance_getter_t03: MissingCompileTimeError
@@ -43,7 +46,6 @@
 Language/Classes/Getters/type_object_t02: CompileTimeError
 Language/Classes/Instance_Methods/override_different_default_values_t01: MissingCompileTimeError
 Language/Classes/Instance_Methods/override_different_default_values_t02: MissingCompileTimeError
-Language/Classes/Instance_Methods/same_name_setter_t01: MissingCompileTimeError
 Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t01: MissingCompileTimeError
 Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t02: MissingCompileTimeError
 Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t04: MissingCompileTimeError
@@ -58,7 +60,6 @@
 Language/Classes/Setters/instance_setter_t04: MissingCompileTimeError
 Language/Classes/Setters/instance_setter_t05: MissingCompileTimeError
 Language/Classes/Setters/instance_setter_t06: MissingCompileTimeError
-Language/Classes/Setters/name_t02: MissingCompileTimeError
 Language/Classes/Setters/name_t06: CompileTimeError
 Language/Classes/Setters/name_t07: CompileTimeError
 Language/Classes/Setters/override_t02: MissingCompileTimeError
diff --git a/tests/language/language_kernel.status b/tests/language/language_kernel.status
index ca82ca7..1dfe445 100644
--- a/tests/language/language_kernel.status
+++ b/tests/language/language_kernel.status
@@ -3,6 +3,8 @@
 # BSD-style license that can be found in the LICENSE file.
 
 [ $compiler == fasta ]
+bad_constructor_test/04: MissingCompileTimeError
+bad_constructor_test/06: MissingCompileTimeError
 function_type_parameter2_negative_test: Fail
 function_type_parameter_negative_test: Fail
 prefix5_negative_test: Fail
diff --git a/tests/language_2/bad_constructor_test.dart b/tests/language_2/bad_constructor_test.dart
index 429da88..4ae6751 100644
--- a/tests/language_2/bad_constructor_test.dart
+++ b/tests/language_2/bad_constructor_test.dart
@@ -14,24 +14,6 @@
   factory B() { return null; }
 }
 
-// A named constructor can't have the same name as a field.
-class C {
-  var field;
-  C
-      .field //# 04: compile-time error
-      ();
-  C.good();
-}
-
-// A named constructor can't have the same name as a method.
-class D {
-  method() {}
-  D
-      .method //# 06: compile-time error
-      ();
-  D.good();
-}
-
 // A named constructor can have the same name as a setter.
 class E {
   set setter(value) {} //# 05: ok
@@ -47,8 +29,6 @@
 main() {
   new A();
   new B();
-  new C.good();
-  new D.good();
   new E.setter();
   new F();
 }
diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status
index 6eb15aa..84e6cba 100644
--- a/tests/language_2/language_2_analyzer.status
+++ b/tests/language_2/language_2_analyzer.status
@@ -173,6 +173,18 @@
 regress_29349_test: CompileTimeError # Issue 29744
 regress_29405_test: CompileTimeError # Issue 29421
 regress_29784_test/02: MissingCompileTimeError # Issue 29784
+regress_33235_03_test/01: MissingCompileTimeError
+regress_33235_07_test/03: MissingCompileTimeError
+regress_33235_10_test/01: MissingCompileTimeError
+regress_33235_10_test/02: MissingCompileTimeError
+regress_33235_10_test/03: MissingCompileTimeError
+regress_33235_11_test/01: MissingCompileTimeError
+regress_33235_12_test/03: MissingCompileTimeError
+regress_33235_13_test/03: MissingCompileTimeError
+regress_33235_16_test/02: MissingCompileTimeError
+regress_33235_16_test/03: MissingCompileTimeError
+regress_33235_19_test: CompileTimeError
+regress_33235_20_test: CompileTimeError
 script1_negative_test: CompileTimeError
 script2_negative_test: CompileTimeError
 setter_declaration2_negative_test: CompileTimeError
diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status
index f838aca..36b3ae9 100644
--- a/tests/language_2/language_2_dart2js.status
+++ b/tests/language_2/language_2_dart2js.status
@@ -668,7 +668,6 @@
 redirecting_factory_malbounded_test/01: MissingCompileTimeError
 regress_13462_1_test: RuntimeError
 regress_18535_test: RuntimeError
-setter4_test: MissingCompileTimeError
 sync_generator2_test/41: Crash # 'file:*/pkg/compiler/lib/src/kernel/element_map_impl.dart': Failed assertion: line 939 pos 18: 'asyncMarker == AsyncMarker.SYNC': is not true.
 sync_generator2_test/52: Crash # 'file:*/pkg/compiler/lib/src/kernel/element_map_impl.dart': Failed assertion: line 939 pos 18: 'asyncMarker == AsyncMarker.SYNC': is not true.
 type_literal_prefix_call_test/00: MissingCompileTimeError
@@ -875,7 +874,6 @@
 regress_13462_1_test: RuntimeError
 regress_18535_test: RuntimeError
 regress_21795_test: RuntimeError # Issue 12605
-setter4_test: MissingCompileTimeError
 stack_trace_test: RuntimeError, OK # Stack trace not preserved in minified code.
 symbol_conflict_test: RuntimeError # Issue 23857
 type_literal_prefix_call_test/00: MissingCompileTimeError
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index b32ddf4..e74d513 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -149,10 +149,22 @@
 regress_29025_test: CompileTimeError # Issue 29081
 regress_29349_test: CompileTimeError # Issue 31093
 regress_29405_test: CompileTimeError # Issue 29421
-regress_29784_test/02: Crash # assert initializers not implemented
 regress_29784_test/02: MissingCompileTimeError
+regress_29784_test/02: Crash # assert initializers not implemented
 regress_30121_test: CompileTimeError # Issue 31087
 regress_30339_test: CompileTimeError # As expected. Should we make this a multi test?
+regress_33235_03_test/01: MissingCompileTimeError
+regress_33235_07_test/03: MissingCompileTimeError
+regress_33235_10_test/01: MissingCompileTimeError
+regress_33235_10_test/02: MissingCompileTimeError
+regress_33235_10_test/03: MissingCompileTimeError
+regress_33235_11_test/01: MissingCompileTimeError
+regress_33235_12_test/03: MissingCompileTimeError
+regress_33235_13_test/03: MissingCompileTimeError
+regress_33235_16_test/02: MissingCompileTimeError
+regress_33235_16_test/03: MissingCompileTimeError
+regress_33235_19_test: CompileTimeError
+regress_33235_20_test: CompileTimeError
 setter_override2_test/02: MissingCompileTimeError # Issue 14736
 stacktrace_test: RuntimeError # Issue 29920
 static_setter_conflicts_test/02: MissingCompileTimeError
@@ -525,7 +537,6 @@
 regress_29784_test/02: MissingCompileTimeError
 regress_30339_test: RuntimeError # Uncaught Expect.isTrue(false) fails.
 regress_30339_test: CompileTimeError
-setter4_test: MissingCompileTimeError
 setter_no_getter_test/01: CompileTimeError
 string_split_test: CompileTimeError # Issue 31616
 string_supertype_checked_test: CompileTimeError # Issue 31616
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index f232147..f0225c8 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -330,7 +330,6 @@
 regress_27617_test/1: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
 regress_29784_test/01: MissingCompileTimeError
 regress_29784_test/02: MissingCompileTimeError
-setter4_test: MissingCompileTimeError # Issue 14736
 switch_bad_case_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
 switch_bad_case_test/02: MissingCompileTimeError # KernelVM bug: Constant evaluation.
 switch_case_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
@@ -1399,6 +1398,34 @@
 prefix_transitive_import_test/01: MissingCompileTimeError
 prefix_transitive_import_test/02: MissingCompileTimeError
 regress_23089_test: MissingCompileTimeError
+regress_33235_05_test/02: MissingCompileTimeError
+regress_33235_05_test/03: MissingCompileTimeError
+regress_33235_06_test/02: MissingCompileTimeError
+regress_33235_06_test/03: MissingCompileTimeError
+regress_33235_07_test/01: MissingCompileTimeError
+regress_33235_07_test/02: MissingCompileTimeError
+regress_33235_07_test/03: MissingCompileTimeError
+regress_33235_08_test/02: MissingCompileTimeError
+regress_33235_08_test/03: MissingCompileTimeError
+regress_33235_09_test/02: MissingCompileTimeError
+regress_33235_09_test/03: MissingCompileTimeError
+regress_33235_10_test/01: MissingCompileTimeError
+regress_33235_10_test/02: MissingCompileTimeError
+regress_33235_10_test/03: MissingCompileTimeError
+regress_33235_12_test/01: MissingCompileTimeError
+regress_33235_12_test/02: MissingCompileTimeError
+regress_33235_12_test/03: MissingCompileTimeError
+regress_33235_13_test/01: MissingCompileTimeError
+regress_33235_13_test/02: MissingCompileTimeError
+regress_33235_13_test/03: MissingCompileTimeError
+regress_33235_14_test/02: MissingCompileTimeError
+regress_33235_14_test/03: MissingCompileTimeError
+regress_33235_15_test/02: MissingCompileTimeError
+regress_33235_15_test/03: MissingCompileTimeError
+regress_33235_16_test/01: MissingCompileTimeError
+regress_33235_16_test/02: MissingCompileTimeError
+regress_33235_16_test/03: MissingCompileTimeError
+setter4_test: MissingCompileTimeError
 setter_override2_test/02: MissingCompileTimeError
 super_no_such_method4_test/01: MissingCompileTimeError # Requires Dart 2 semantics. See http://dartbug.com/33380.
 super_no_such_method5_test/01: MissingCompileTimeError # Requires Dart 2 semantics. See http://dartbug.com/33380.
diff --git a/tests/language_2/regress_33235_01_test.dart b/tests/language_2/regress_33235_01_test.dart
new file mode 100644
index 0000000..e4b252d
--- /dev/null
+++ b/tests/language_2/regress_33235_01_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class C {
+  C.n() {} // //# 01: compile-time error
+
+  static int get n {
+    return 42;
+  }
+}
+
+main() {
+  print(C);
+}
diff --git a/tests/language_2/regress_33235_02_test.dart b/tests/language_2/regress_33235_02_test.dart
new file mode 100644
index 0000000..6cc51d2
--- /dev/null
+++ b/tests/language_2/regress_33235_02_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class C {
+  C.n() {} // //# 01: compile-time error
+
+  static int n() {
+    return 42;
+  }
+}
+
+main() {
+  print(C);
+}
diff --git a/tests/language_2/regress_33235_03_test.dart b/tests/language_2/regress_33235_03_test.dart
new file mode 100644
index 0000000..f1e762b
--- /dev/null
+++ b/tests/language_2/regress_33235_03_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class C {
+  C.n() {} // //# 01: compile-time error
+
+  static set n(int x) {}
+}
+
+main() {
+  print(C);
+}
diff --git a/tests/language_2/regress_33235_04_test.dart b/tests/language_2/regress_33235_04_test.dart
new file mode 100644
index 0000000..db46401
--- /dev/null
+++ b/tests/language_2/regress_33235_04_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class C {
+  static int get n => 42; // //# 01: compile-time error
+
+  static int n() => 42;
+}
+
+main() {
+  print(C);
+}
diff --git a/tests/language_2/regress_33235_05_test.dart b/tests/language_2/regress_33235_05_test.dart
new file mode 100644
index 0000000..179a4f3
--- /dev/null
+++ b/tests/language_2/regress_33235_05_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int get n => 43;
+}
+
+class B extends A {
+  static int get n => 42; // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  static int get n => 42; // //# 03: compile-time error
+}
+
+class C {
+  static int get n => 42; // //# 01: compile-time error
+
+  int get n => 43;
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_06_test.dart b/tests/language_2/regress_33235_06_test.dart
new file mode 100644
index 0000000..bd9bcc2
--- /dev/null
+++ b/tests/language_2/regress_33235_06_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int n() => 43;
+}
+
+class B extends A {
+  static int get n => 42; // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  static int get n => 42; // //# 03: compile-time error
+}
+
+class C {
+  static int get n => 42; // //# 01: compile-time error
+
+  int n() => 43;
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_07_test.dart b/tests/language_2/regress_33235_07_test.dart
new file mode 100644
index 0000000..da33ad7
--- /dev/null
+++ b/tests/language_2/regress_33235_07_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  void set n(int i) {}
+}
+
+class B extends A {
+  static int get n => 42; // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  static int get n => 42; // //# 03: compile-time error
+}
+
+class C {
+  static int get n => 42; // //# 01: compile-time error
+
+  void set n(int i) {}
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_08_test.dart b/tests/language_2/regress_33235_08_test.dart
new file mode 100644
index 0000000..82369f5
--- /dev/null
+++ b/tests/language_2/regress_33235_08_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int get n => 43;
+}
+
+class B extends A {
+  static int n() => 42; // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  static int n() => 42; // //# 03: compile-time error
+}
+
+class C {
+  static int n() => 42; // //# 01: compile-time error
+
+  int get n => 43;
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_09_test.dart b/tests/language_2/regress_33235_09_test.dart
new file mode 100644
index 0000000..b9cff42
--- /dev/null
+++ b/tests/language_2/regress_33235_09_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int n() => 43;
+}
+
+class B extends A {
+  static int n() => 42; // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  static int n() => 42; // //# 03: compile-time error
+}
+
+class C {
+  static int n() => 42; // //# 01: compile-time error
+
+  int n() => 43;
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_10_test.dart b/tests/language_2/regress_33235_10_test.dart
new file mode 100644
index 0000000..0aa1514
--- /dev/null
+++ b/tests/language_2/regress_33235_10_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  void set n(int i) {}
+}
+
+class B extends A {
+  static int n() => 42; // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  static int n() => 42; // //# 03: compile-time error
+}
+
+class C {
+  static int n() => 42; // //# 01: compile-time error
+
+  void set n(int i) {}
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_11_test.dart b/tests/language_2/regress_33235_11_test.dart
new file mode 100644
index 0000000..08d4e49
--- /dev/null
+++ b/tests/language_2/regress_33235_11_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class C {
+  static void set n(int i) {} // //# 01: compile-time error
+
+  static int n() => 42;
+}
+
+main() {
+  print(C);
+}
diff --git a/tests/language_2/regress_33235_12_test.dart b/tests/language_2/regress_33235_12_test.dart
new file mode 100644
index 0000000..b8e2ec3
--- /dev/null
+++ b/tests/language_2/regress_33235_12_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int get n => 42;
+}
+
+class B extends A {
+  static void set n(int i) {} // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  static void set n(int i) {} // //# 03: compile-time error
+}
+
+class C {
+  static void set n(int i) {} // //# 01: compile-time error
+
+  int get n => 42;
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_13_test.dart b/tests/language_2/regress_33235_13_test.dart
new file mode 100644
index 0000000..13a0c35
--- /dev/null
+++ b/tests/language_2/regress_33235_13_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int n() => 42;
+}
+
+class B extends A {
+  static void set n(int i) {} // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  static void set n(int i) {} // //# 03: compile-time error
+}
+
+class C {
+  static void set n(int i) {} // //# 01: compile-time error
+
+  int n() => 42;
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_14_test.dart b/tests/language_2/regress_33235_14_test.dart
new file mode 100644
index 0000000..0ba2cba
--- /dev/null
+++ b/tests/language_2/regress_33235_14_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+class A {
+  void set n(int x) {}
+}
+
+class B extends A {
+  static void set n(int i) {} // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  static void set n(int i) {} // //# 03: compile-time error
+}
+
+class C {
+  static void set n(int i) {} // //# 01: compile-time error
+
+  void set n(int x) {}
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_15_test.dart b/tests/language_2/regress_33235_15_test.dart
new file mode 100644
index 0000000..6264201
--- /dev/null
+++ b/tests/language_2/regress_33235_15_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int n() => 43;
+}
+
+class B extends A {
+  int get n => 42; // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  int get n => 42; // //# 03: compile-time error
+}
+
+class C {
+  int get n => 42; // //# 01: compile-time error
+
+  int n() => 43;
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_16_test.dart b/tests/language_2/regress_33235_16_test.dart
new file mode 100644
index 0000000..d3d5c05
--- /dev/null
+++ b/tests/language_2/regress_33235_16_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int n() => 43;
+}
+
+class B extends A {
+  void set n(int i) {} // //# 02: compile-time error
+}
+
+abstract class B2 implements A {
+  void set n(int i) {} // //# 03: compile-time error
+}
+
+class C {
+  void set n(int i) {} // //# 01: compile-time error
+
+  int n() => 43;
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_17_test.dart b/tests/language_2/regress_33235_17_test.dart
new file mode 100644
index 0000000..95ae7d7
--- /dev/null
+++ b/tests/language_2/regress_33235_17_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class C {
+  static void set n(int i) {}
+
+  static int get n {
+    return 43;
+  }
+}
+
+main() {
+  print(C);
+}
diff --git a/tests/language_2/regress_33235_18_test.dart b/tests/language_2/regress_33235_18_test.dart
new file mode 100644
index 0000000..ec72cb1
--- /dev/null
+++ b/tests/language_2/regress_33235_18_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  void set n(int i) {}
+}
+
+class B extends A {
+  int get n {
+    return 42;
+  }
+}
+
+abstract class B2 implements A {
+  int get n {
+    return 42;
+  }
+}
+
+class C {
+  int get n {
+    return 42;
+  }
+
+  void set n(int i) {}
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_19_test.dart b/tests/language_2/regress_33235_19_test.dart
new file mode 100644
index 0000000..999d661
--- /dev/null
+++ b/tests/language_2/regress_33235_19_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int n() {
+    return 42;
+  }
+}
+
+class B extends A {
+  B.n() {}
+}
+
+abstract class B2 implements A {
+  B2.n() {}
+}
+
+class C {
+  C.n() {}
+
+  int n() {
+    return 42;
+  }
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_20_test.dart b/tests/language_2/regress_33235_20_test.dart
new file mode 100644
index 0000000..d312026
--- /dev/null
+++ b/tests/language_2/regress_33235_20_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  int get n {
+    return 42;
+  }
+}
+
+class B extends A {
+  B.n() {}
+}
+
+abstract class B2 implements A {
+  B2.n() {}
+}
+
+class C {
+  C.n() {}
+
+  int get n {
+    return 42;
+  }
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}
diff --git a/tests/language_2/regress_33235_21_test.dart b/tests/language_2/regress_33235_21_test.dart
new file mode 100644
index 0000000..b013bce
--- /dev/null
+++ b/tests/language_2/regress_33235_21_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for complience with tables at
+// https://github.com/dart-lang/sdk/issues/33235#issue-326617285
+// Files 01 to 16 should be compile time errors, files 17 to 21 should not.
+
+class A {
+  void set n(int i) {}
+}
+
+class B extends A {
+  B.n() {}
+}
+
+abstract class B2 implements A {
+  B2.n() {}
+}
+
+class C {
+  C.n() {}
+
+  void set n(int i) {}
+}
+
+main() {
+  print(C);
+  print(B);
+  print(B2);
+}