Add fasta regress test for 34563
Change-Id: Ic5971e44e1853215f8e841d589ea9ef12bdef179
Reviewed-on: https://dart-review.googlesource.com/c/78100
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
diff --git a/pkg/front_end/testcases/compile.status b/pkg/front_end/testcases/compile.status
index 02e7200..ee5dcfb 100644
--- a/pkg/front_end/testcases/compile.status
+++ b/pkg/front_end/testcases/compile.status
@@ -102,6 +102,7 @@
regress/issue_32972: RuntimeError
regress/issue_33452: RuntimeError # Test has an intentional error
regress/issue_34225: RuntimeError
+regress/issue_34563: RuntimeError # Test execution after recovery
runtime_checks/implicit_downcast_constructor_initializer: RuntimeError # Test exercises strong mode semantics
runtime_checks/implicit_downcast_do: RuntimeError # Test exercises strong mode semantics
runtime_checks/implicit_downcast_for_condition: RuntimeError # Test exercises strong mode semantics
diff --git a/pkg/front_end/testcases/regress/issue_34563.dart b/pkg/front_end/testcases/regress/issue_34563.dart
new file mode 100644
index 0000000..84109cc
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34563.dart
@@ -0,0 +1,26 @@
+// 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.
+
+mixin M1 {
+ int get m => 1;
+}
+
+mixin M2 extend M1 {}
+
+mixin M3 extends M1 {}
+
+class C1 {
+ int get c => 2;
+}
+
+class C2 extend C1 with M2 {}
+
+class C3 on C1 with M3 {}
+
+main() {
+ var c2 = new C2();
+ c2.m + c2.c;
+ var c3 = new C3();
+ c3.m + c3.c;
+}
diff --git a/pkg/front_end/testcases/regress/issue_34563.dart.direct.expect b/pkg/front_end/testcases/regress/issue_34563.dart.direct.expect
new file mode 100644
index 0000000..e878e85
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34563.dart.direct.expect
@@ -0,0 +1,80 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:9:10: Error: Expected 'on' instead of this.
+// mixin M2 extend M1 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:11:10: Error: Expected 'on' instead of this.
+// mixin M3 extends M1 {}
+// ^^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:17:10: Error: Expected 'extends' instead of this.
+// class C2 extend C1 with M2 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:19:10: Error: Expected 'extends' instead of this.
+// class C3 on C1 with M3 {}
+// ^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:9:10: Error: Expected 'on' instead of this.
+// mixin M2 extend M1 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:11:10: Error: Expected 'on' instead of this.
+// mixin M3 extends M1 {}
+// ^^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:17:10: Error: Expected 'extends' instead of this.
+// class C2 extend C1 with M2 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:19:10: Error: Expected 'extends' instead of this.
+// class C3 on C1 with M3 {}
+// ^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+abstract class M1 extends core::Object {
+ synthetic constructor •() → self::M1
+ : super core::Object::•()
+ ;
+ get m() → core::int
+ return 1;
+}
+abstract class M2 extends core::Object {
+ synthetic constructor •() → self::M2
+ : super core::Object::•()
+ ;
+}
+abstract class M3 extends core::Object {
+ synthetic constructor •() → self::M3
+ : super core::Object::•()
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+ get c() → core::int
+ return 2;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+}
+class C3 extends core::Object {
+ synthetic constructor •() → self::C3
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {
+ dynamic c2 = new self::C2::•();
+ c2.m.+(c2.c);
+ dynamic c3 = new self::C3::•();
+ c3.m.+(c3.c);
+}
diff --git a/pkg/front_end/testcases/regress/issue_34563.dart.direct.transformed.expect b/pkg/front_end/testcases/regress/issue_34563.dart.direct.transformed.expect
new file mode 100644
index 0000000..5e662e3
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34563.dart.direct.transformed.expect
@@ -0,0 +1,62 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:9:10: Error: Expected 'on' instead of this.
+// mixin M2 extend M1 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:11:10: Error: Expected 'on' instead of this.
+// mixin M3 extends M1 {}
+// ^^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:17:10: Error: Expected 'extends' instead of this.
+// class C2 extend C1 with M2 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:19:10: Error: Expected 'extends' instead of this.
+// class C3 on C1 with M3 {}
+// ^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+abstract class M1 extends core::Object {
+ synthetic constructor •() → self::M1
+ : super core::Object::•()
+ ;
+ get m() → core::int
+ return 1;
+}
+abstract class M2 extends core::Object {
+ synthetic constructor •() → self::M2
+ : super core::Object::•()
+ ;
+}
+abstract class M3 extends core::Object {
+ synthetic constructor •() → self::M3
+ : super core::Object::•()
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+ get c() → core::int
+ return 2;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+}
+class C3 extends core::Object {
+ synthetic constructor •() → self::C3
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {
+ dynamic c2 = new self::C2::•();
+ c2.m.+(c2.c);
+ dynamic c3 = new self::C3::•();
+ c3.m.+(c3.c);
+}
diff --git a/pkg/front_end/testcases/regress/issue_34563.dart.outline.expect b/pkg/front_end/testcases/regress/issue_34563.dart.outline.expect
new file mode 100644
index 0000000..8a53597
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34563.dart.outline.expect
@@ -0,0 +1,52 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:9:10: Error: Expected 'on' instead of this.
+// mixin M2 extend M1 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:11:10: Error: Expected 'on' instead of this.
+// mixin M3 extends M1 {}
+// ^^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:17:10: Error: Expected 'extends' instead of this.
+// class C2 extend C1 with M2 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:19:10: Error: Expected 'extends' instead of this.
+// class C3 on C1 with M3 {}
+// ^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+abstract class M1 extends core::Object {
+ synthetic constructor •() → self::M1
+ ;
+ get m() → core::int
+ ;
+}
+abstract class M2 extends core::Object {
+ synthetic constructor •() → self::M2
+ ;
+}
+abstract class M3 extends core::Object {
+ synthetic constructor •() → self::M3
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ ;
+ get c() → core::int
+ ;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ ;
+}
+class C3 extends core::Object {
+ synthetic constructor •() → self::C3
+ ;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/regress/issue_34563.dart.strong.expect b/pkg/front_end/testcases/regress/issue_34563.dart.strong.expect
new file mode 100644
index 0000000..c1eaeba
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34563.dart.strong.expect
@@ -0,0 +1,112 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:9:10: Error: Expected 'on' instead of this.
+// mixin M2 extend M1 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:11:10: Error: Expected 'on' instead of this.
+// mixin M3 extends M1 {}
+// ^^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:17:10: Error: Expected 'extends' instead of this.
+// class C2 extend C1 with M2 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:19:10: Error: Expected 'extends' instead of this.
+// class C3 on C1 with M3 {}
+// ^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:23:6: Error: The getter 'm' isn't defined for the class '#lib1::C2'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'm'.
+// c2.m + c2.c;
+// ^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:23:13: Error: The getter 'c' isn't defined for the class '#lib1::C2'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'c'.
+// c2.m + c2.c;
+// ^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:25:6: Error: The getter 'm' isn't defined for the class '#lib1::C3'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'm'.
+// c3.m + c3.c;
+// ^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:25:13: Error: The getter 'c' isn't defined for the class '#lib1::C3'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'c'.
+// c3.m + c3.c;
+// ^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:9:10: Error: Expected 'on' instead of this.
+// mixin M2 extend M1 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:11:10: Error: Expected 'on' instead of this.
+// mixin M3 extends M1 {}
+// ^^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:17:10: Error: Expected 'extends' instead of this.
+// class C2 extend C1 with M2 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:19:10: Error: Expected 'extends' instead of this.
+// class C3 on C1 with M3 {}
+// ^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+abstract class M1 extends core::Object {
+ synthetic constructor •() → self::M1
+ : super core::Object::•()
+ ;
+ get m() → core::int
+ return 1;
+}
+abstract class M2 extends core::Object {
+ synthetic constructor •() → self::M2
+ : super core::Object::•()
+ ;
+}
+abstract class M3 extends core::Object {
+ synthetic constructor •() → self::M3
+ : super core::Object::•()
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+ get c() → core::int
+ return 2;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+}
+class C3 extends core::Object {
+ synthetic constructor •() → self::C3
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {
+ self::C2 c2 = new self::C2::•();
+ (let final dynamic #t1 = c2 in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34563.dart:23:6: Error: The getter 'm' isn't defined for the class '#lib1::C2'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'm'.
+ c2.m + c2.c;
+ ^").+(let final dynamic #t2 = c2 in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34563.dart:23:13: Error: The getter 'c' isn't defined for the class '#lib1::C2'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'c'.
+ c2.m + c2.c;
+ ^");
+ self::C3 c3 = new self::C3::•();
+ (let final dynamic #t3 = c3 in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34563.dart:25:6: Error: The getter 'm' isn't defined for the class '#lib1::C3'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'm'.
+ c3.m + c3.c;
+ ^").+(let final dynamic #t4 = c3 in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34563.dart:25:13: Error: The getter 'c' isn't defined for the class '#lib1::C3'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'c'.
+ c3.m + c3.c;
+ ^");
+}
diff --git a/pkg/front_end/testcases/regress/issue_34563.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_34563.dart.strong.transformed.expect
new file mode 100644
index 0000000..8301f54
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34563.dart.strong.transformed.expect
@@ -0,0 +1,74 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:9:10: Error: Expected 'on' instead of this.
+// mixin M2 extend M1 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:11:10: Error: Expected 'on' instead of this.
+// mixin M3 extends M1 {}
+// ^^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:17:10: Error: Expected 'extends' instead of this.
+// class C2 extend C1 with M2 {}
+// ^^^^^^
+//
+// pkg/front_end/testcases/regress/issue_34563.dart:19:10: Error: Expected 'extends' instead of this.
+// class C3 on C1 with M3 {}
+// ^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+abstract class M1 extends core::Object {
+ synthetic constructor •() → self::M1
+ : super core::Object::•()
+ ;
+ get m() → core::int
+ return 1;
+}
+abstract class M2 extends core::Object {
+ synthetic constructor •() → self::M2
+ : super core::Object::•()
+ ;
+}
+abstract class M3 extends core::Object {
+ synthetic constructor •() → self::M3
+ : super core::Object::•()
+ ;
+}
+class C1 extends core::Object {
+ synthetic constructor •() → self::C1
+ : super core::Object::•()
+ ;
+ get c() → core::int
+ return 2;
+}
+class C2 extends core::Object {
+ synthetic constructor •() → self::C2
+ : super core::Object::•()
+ ;
+}
+class C3 extends core::Object {
+ synthetic constructor •() → self::C3
+ : super core::Object::•()
+ ;
+}
+static method main() → dynamic {
+ self::C2 c2 = new self::C2::•();
+ (let final self::C2 #t1 = c2 in let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34563.dart:23:6: Error: The getter 'm' isn't defined for the class '#lib1::C2'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'm'.
+ c2.m + c2.c;
+ ^").+(let final self::C2 #t2 = c2 in let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34563.dart:23:13: Error: The getter 'c' isn't defined for the class '#lib1::C2'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'c'.
+ c2.m + c2.c;
+ ^");
+ self::C3 c3 = new self::C3::•();
+ (let final self::C3 #t3 = c3 in let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34563.dart:25:6: Error: The getter 'm' isn't defined for the class '#lib1::C3'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'm'.
+ c3.m + c3.c;
+ ^").+(let final self::C3 #t4 = c3 in let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34563.dart:25:13: Error: The getter 'c' isn't defined for the class '#lib1::C3'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'c'.
+ c3.m + c3.c;
+ ^");
+}
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 294589e..321eb12 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -193,6 +193,7 @@
regress/issue_32972: TypeCheckError
regress/issue_33452: RuntimeError # Test has an intentional error
regress/issue_34225: RuntimeError
+regress/issue_34563: RuntimeError # Test execution after recovery
runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast: RuntimeError
runtime_checks_new/mixin_forwarding_stub_field: TypeCheckError
runtime_checks_new/mixin_forwarding_stub_getter: TypeCheckError