diff --git a/tests/language/loop/for_in3_test.dart b/tests/language/loop/for_in3_test.dart index 7de80496e4d..b03e6be81f2 100644 --- a/tests/language/loop/for_in3_test.dart +++ b/tests/language/loop/for_in3_test.dart @@ -6,5 +6,8 @@ main() { var chars = []; - for (var c in "foo") chars.add(c); /*@compile-error=unspecified*/ + for (var c in "foo") chars.add(c); + // ^^^^^ + // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE + // [cfe] The type 'String' used in the 'for' loop must implement 'Iterable'. } diff --git a/tests/language/main/not_a_function_test.dart b/tests/language/main/not_a_function_test.dart index 62ab4ccb86a..a57fa7f43da 100644 --- a/tests/language/main/not_a_function_test.dart +++ b/tests/language/main/not_a_function_test.dart @@ -4,4 +4,9 @@ main() {} -var main; /*@compile-error=unspecified*/ +var main; +// ^^^^ +// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION +// [analyzer] COMPILE_TIME_ERROR.MAIN_IS_NOT_FUNCTION +// [cfe] 'main' is already declared in this scope. +// [cfe] The 'main' declaration must be a function declaration. diff --git a/tests/language/malbounded/type_cast2_test.dart b/tests/language/malbounded/type_cast2_test.dart index 06940a8e958..2f3a41788f3 100644 --- a/tests/language/malbounded/type_cast2_test.dart +++ b/tests/language/malbounded/type_cast2_test.dart @@ -8,7 +8,11 @@ class A {} class B { test() { - new A() as A; /*@compile-error=unspecified*/ + new A() as A; + // ^ + // [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. + // ^ + // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS } } diff --git a/tests/language/malformed/type_test.dart b/tests/language/malformed/type_test.dart index b464d6eed97..f54cb3fdfce 100644 --- a/tests/language/malformed/type_test.dart +++ b/tests/language/malformed/type_test.dart @@ -3,7 +3,11 @@ // BSD-style license that can be found in the LICENSE file. null_() => null; -final Undeclared/*@compile-error=unspecified*/ x = null_(); +final Undeclared x = null_(); +// ^^^^^^^^^^ +// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS +// [cfe] 'Undeclared' isn't a type. +// [cfe] Type 'Undeclared' not found. main() { print(x); diff --git a/tests/language/mixin/with_two_implicit_constructors_test.dart b/tests/language/mixin/with_two_implicit_constructors_test.dart index 198461b9185..8fcf3eaeb72 100644 --- a/tests/language/mixin/with_two_implicit_constructors_test.dart +++ b/tests/language/mixin/with_two_implicit_constructors_test.dart @@ -10,11 +10,14 @@ class A { A() : field = 2; } -class Mixin {} +mixin Mixin {} class B extends A with Mixin {} main() { Expect.equals(2, new B().field); - new B.bar(); /*@compile-error=unspecified*/ + new B.bar(); + // ^^^ + // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR + // [cfe] Couldn't find constructor 'B.bar'. } diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart index 5d99d2f5c24..05eccb65717 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart @@ -11,6 +11,11 @@ mixin M0 on I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 extends I with M0 {} /*@compile-error=unspecified*/ +class A00 extends I with M0 {} +// ^ +// [cfe] 'I with M0' can't implement both 'I' and 'I' +// [cfe] 'I' doesn't implement 'I' so it can't be used with 'M0'. +// ^^ +// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart index 749d8134628..551adec9745 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart @@ -13,6 +13,11 @@ mixin M1 on I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 extends I with M0, M1 {} /*@compile-error=unspecified*/ +class A00 extends I with M0, M1 {} +// ^ +// [cfe] 'I with M0, M1' can't implement both 'I' and 'I' +// [cfe] '_A00&I&M0' doesn't implement 'I' so it can't be used with 'M1'. +// ^^ +// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart index 01ae1ae6688..d08f401b98b 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart @@ -13,6 +13,11 @@ mixin M1 on I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 with M0, M1 {} /*@compile-error=unspecified*/ +class A00 with M0, M1 {} +// ^ +// [cfe] 'Object with M0, M1' can't implement both 'I' and 'I' +// [cfe] '_A00&Object&M0' doesn't implement 'I' so it can't be used with 'M1'. +// ^^ +// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart index 574170024c8..d10d26180a5 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart @@ -11,6 +11,9 @@ mixin M0 implements I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 extends Object with M0 implements I {} /*@compile-error=unspecified*/ +class A00 extends Object with M0 implements I {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'A00' can't implement both 'I' and 'I' -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart index 50d017b9e03..29531fc5dff 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart @@ -11,6 +11,9 @@ mixin M0 implements I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 with M0 implements I {} /*@compile-error=unspecified*/ +class A00 with M0 implements I {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'A00' can't implement both 'I' and 'I' -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart index 38e681e561b..14986e3806a 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart @@ -13,6 +13,9 @@ mixin M1 implements I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 extends I with M0, M1 {} /*@compile-error=unspecified*/ +class A00 extends I with M0, M1 {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'I with M0, M1' can't implement both 'I' and 'I' -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart index 14c2416d92f..7e63c63db10 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. class I {} + class J {} mixin M0 implements I, J {} @@ -14,10 +15,21 @@ mixin M1 implements I, J {} /////////////////////////////////////////////////////// class A00 extends I with M0 {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'I with M0' can't implement both 'I' and 'I' class A01 extends J with M1 {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'J with M1' can't implement both 'J' and 'J' // Error since class hierarchy is inconsistent -class A02 extends A00 implements A01 {} /*@compile-error=unspecified*/ +class A02 extends A00 implements A01 {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'A02' can't implement both 'I' and 'I' +// [cfe] 'A02' can't implement both 'J' and 'J' -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart index 9b16c66ad89..a3f100978f0 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart @@ -14,6 +14,9 @@ class M1 implements I {} // M0 is inferred as M0> // Error since super-bounded type not allowed -class A extends M1 with M0 {} /*@compile-error=unspecified*/ +class A extends M1 with M0 {} +// ^^ +// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS +// [cfe] Inferred type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0'. -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart index 23da50d3057..7dac44808fa 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart @@ -12,10 +12,12 @@ mixin M1 implements I {} // Inference is not bi-directional /////////////////////////////////////////////////////// - // M0, M1 is a solution, but we shouldn't find it // M0 inferred as M0 // M1 inferred as M1 -class A with M0, M1 {} /*@compile-error=unspecified*/ +class A with M0, M1 {} +// ^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'Object with M0, M1' can't implement both 'I' and 'I' -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart index 0ebdf97cd4a..8dad7015984 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart @@ -18,6 +18,9 @@ mixin M1 implements I, T> {} // U0 = List // U1 = List // which has no finite solution -class A with M0, M1 {} /*@compile-error=unspecified*/ +class A with M0, M1 {} +// ^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'Object with M0, M1' can't implement both 'I>' and 'I, dynamic>' -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart index 00563ef385f..cd7795f734c 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart @@ -2,14 +2,21 @@ // 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. -class I {} -class J {} +mixin I {} + +mixin J {} + mixin M0 implements I, J {} ////////////////////////////////////////////////////// // Over-constrained results are caught /////////////////////////////////////////////////////// -class A with I, J, M0 {} /*@compile-error=unspecified*/ +class A with I, J, M0 {} +// ^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'Object with I, J, M0' can't implement both 'I' and 'I' +// [cfe] 'Object with I, J, M0' can't implement both 'J' and 'J' -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart index c7de81ee83c..40a962cb9c6 100644 --- a/tests/language/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart +++ b/tests/language/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. class I {} + mixin M1 on I {} ////////////////////////////////////////////////////// @@ -10,6 +11,9 @@ mixin M1 on I {} // the "on" clause of a mixin /////////////////////////////////////////////////////// -mixin A00Mixin on I, M1 {} /*@compile-error=unspecified*/ +mixin A00Mixin on I, M1 {} +// ^^^^^^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'I with M1' can't implement both 'I' and 'I' -void main() {} \ No newline at end of file +void main() {} diff --git a/tests/language/mixin_legacy/with_two_implicit_constructors_test.dart b/tests/language/mixin_legacy/with_two_implicit_constructors_test.dart index cf872a2a514..bc21f21630c 100644 --- a/tests/language/mixin_legacy/with_two_implicit_constructors_test.dart +++ b/tests/language/mixin_legacy/with_two_implicit_constructors_test.dart @@ -18,5 +18,8 @@ class B extends A with Mixin {} main() { Expect.equals(2, new B().field); - new B.bar(); /*@compile-error=unspecified*/ + new B.bar(); + // ^^^ + // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR + // [cfe] Couldn't find constructor 'B.bar'. } diff --git a/tests/language_2/loop/for_in3_test.dart b/tests/language_2/loop/for_in3_test.dart index 3f38724a335..f64bcc06aa4 100644 --- a/tests/language_2/loop/for_in3_test.dart +++ b/tests/language_2/loop/for_in3_test.dart @@ -8,5 +8,8 @@ main() { var chars = []; - for (var c in "foo") chars.add(c); /*@compile-error=unspecified*/ + for (var c in "foo") chars.add(c); + // ^^^^^ + // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE + // [cfe] The type 'String' used in the 'for' loop must implement 'Iterable'. } diff --git a/tests/language_2/main/not_a_function_test.dart b/tests/language_2/main/not_a_function_test.dart index ff2b02a32cf..5b5321c59fe 100644 --- a/tests/language_2/main/not_a_function_test.dart +++ b/tests/language_2/main/not_a_function_test.dart @@ -6,4 +6,7 @@ main() {} -var main; /*@compile-error=unspecified*/ +var main; +// ^^^^ +// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION +// [cfe] 'main' is already declared in this scope. diff --git a/tests/language_2/malbounded/type_cast2_test.dart b/tests/language_2/malbounded/type_cast2_test.dart index e001c815cb2..70d11c2d241 100644 --- a/tests/language_2/malbounded/type_cast2_test.dart +++ b/tests/language_2/malbounded/type_cast2_test.dart @@ -10,7 +10,11 @@ class A {} class B { test() { - new A() as A; /*@compile-error=unspecified*/ + new A() as A; + // ^ + // [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. + // ^ + // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS } } diff --git a/tests/language_2/malformed/type_test.dart b/tests/language_2/malformed/type_test.dart index c68374ce3cf..f86205ab9be 100644 --- a/tests/language_2/malformed/type_test.dart +++ b/tests/language_2/malformed/type_test.dart @@ -5,7 +5,11 @@ // @dart = 2.9 null_() => null; -final Undeclared/*@compile-error=unspecified*/ x = null_(); +final Undeclared x = null_(); +// ^^^^^^^^^^ +// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS +// [cfe] 'Undeclared' isn't a type. +// [cfe] Type 'Undeclared' not found. main() { print(x); diff --git a/tests/language_2/mixin/with_two_implicit_constructors_test.dart b/tests/language_2/mixin/with_two_implicit_constructors_test.dart index 99ec9256deb..a772cb27159 100644 --- a/tests/language_2/mixin/with_two_implicit_constructors_test.dart +++ b/tests/language_2/mixin/with_two_implicit_constructors_test.dart @@ -18,5 +18,8 @@ class B extends A with Mixin {} main() { Expect.equals(2, new B().field); - new B.bar(); /*@compile-error=unspecified*/ + new B.bar(); + // ^^^ + // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR + // [cfe] Couldn't find constructor 'B.bar'. } diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart index c9c7c6b657f..2ca0bcae55a 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart @@ -13,6 +13,11 @@ mixin M0 on I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 extends I with M0 {} /*@compile-error=unspecified*/ +class A00 extends I with M0 {} +// ^ +// [cfe] 'I with M0' can't implement both 'I' and 'I' +// [cfe] 'I' doesn't implement 'I' so it can't be used with 'M0'. +// ^^ +// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart index 5d6479f1e6e..794744cb6b8 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart @@ -15,6 +15,11 @@ mixin M1 on I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 extends I with M0, M1 {} /*@compile-error=unspecified*/ +class A00 extends I with M0, M1 {} +// ^ +// [cfe] 'I with M0, M1' can't implement both 'I' and 'I' +// [cfe] '_A00&I&M0' doesn't implement 'I' so it can't be used with 'M1'. +// ^^ +// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart index db71dbd64f2..5a91874d8a8 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart @@ -15,6 +15,11 @@ mixin M1 on I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 with M0, M1 {} /*@compile-error=unspecified*/ +class A00 with M0, M1 {} +// ^ +// [cfe] 'Object with M0, M1' can't implement both 'I' and 'I' +// [cfe] '_A00&Object&M0' doesn't implement 'I' so it can't be used with 'M1'. +// ^^ +// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart index cd7b086868b..3da5db19348 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart @@ -13,6 +13,9 @@ mixin M0 implements I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 extends Object with M0 implements I {} /*@compile-error=unspecified*/ +class A00 extends Object with M0 implements I {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'A00' can't implement both 'I' and 'I' void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart index 55e952384fe..8b83d4a479c 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart @@ -13,6 +13,9 @@ mixin M0 implements I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 with M0 implements I {} /*@compile-error=unspecified*/ +class A00 with M0 implements I {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'A00' can't implement both 'I' and 'I' void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart index e41b8f7e26e..9e6ca94f790 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart @@ -15,6 +15,9 @@ mixin M1 implements I {} /////////////////////////////////////////////////////// // Error since class hierarchy is inconsistent -class A00 extends I with M0, M1 {} /*@compile-error=unspecified*/ +class A00 extends I with M0, M1 {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'I with M0, M1' can't implement both 'I' and 'I' void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart index a3a2934eade..e1e18418a65 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart @@ -5,6 +5,7 @@ // @dart = 2.9 class I {} + class J {} mixin M0 implements I, J {} @@ -16,10 +17,21 @@ mixin M1 implements I, J {} /////////////////////////////////////////////////////// class A00 extends I with M0 {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'I with M0' can't implement both 'I' and 'I' class A01 extends J with M1 {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'J with M1' can't implement both 'J' and 'J' // Error since class hierarchy is inconsistent -class A02 extends A00 implements A01 {} /*@compile-error=unspecified*/ +class A02 extends A00 implements A01 {} +// ^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'A02' can't implement both 'I' and 'I' +// [cfe] 'A02' can't implement both 'J' and 'J' void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart index 956f20d35fa..fadea9d8d3f 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart @@ -16,6 +16,9 @@ class M1 implements I {} // M0 is inferred as M0> // Error since super-bounded type not allowed -class A extends M1 with M0 {} /*@compile-error=unspecified*/ +class A extends M1 with M0 {} +// ^^ +// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS +// [cfe] Inferred type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0'. void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart index c49d34164ea..e6d98491721 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart @@ -14,10 +14,12 @@ mixin M1 implements I {} // Inference is not bi-directional /////////////////////////////////////////////////////// - // M0, M1 is a solution, but we shouldn't find it // M0 inferred as M0 // M1 inferred as M1 -class A with M0, M1 {} /*@compile-error=unspecified*/ +class A with M0, M1 {} +// ^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'Object with M0, M1' can't implement both 'I' and 'I' void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart index 245644009a1..e589fb7e08b 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart @@ -20,6 +20,9 @@ mixin M1 implements I, T> {} // U0 = List // U1 = List // which has no finite solution -class A with M0, M1 {} /*@compile-error=unspecified*/ +class A with M0, M1 {} +// ^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'Object with M0, M1' can't implement both 'I>' and 'I, dynamic>' void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart index d76c854a95d..9dc67535391 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart @@ -5,13 +5,20 @@ // @dart = 2.9 class I {} + class J {} + mixin M0 implements I, J {} ////////////////////////////////////////////////////// // Over-constrained results are caught /////////////////////////////////////////////////////// -class A with I, J, M0 {} /*@compile-error=unspecified*/ +class A with I, J, M0 {} +// ^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'Object with I, J, M0' can't implement both 'I' and 'I' +// [cfe] 'Object with I, J, M0' can't implement both 'J' and 'J' void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart index eca6a978730..90d66d35808 100644 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart +++ b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart @@ -5,6 +5,7 @@ // @dart = 2.9 class I {} + mixin M1 on I {} ////////////////////////////////////////////////////// @@ -12,6 +13,9 @@ mixin M1 on I {} // the "on" clause of a mixin /////////////////////////////////////////////////////// -mixin A00Mixin on I, M1 {} /*@compile-error=unspecified*/ +mixin A00Mixin on I, M1 {} +// ^^^^^^^^ +// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES +// [cfe] 'I with M1' can't implement both 'I' and 'I' void main() {}