Version 2.15.0-44.0.dev
Merge commit 'd3c3e927404d2403640d9302b28b17e83c15da11' into 'dev'
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index 0e88d0e..a2806c1 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -1756,6 +1756,18 @@
r"""Constructor bodies can't use 'async', 'async*', or 'sync*'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstructorTearOffWithTypeArguments =
+ messageConstructorTearOffWithTypeArguments;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstructorTearOffWithTypeArguments = const MessageCode(
+ "ConstructorTearOffWithTypeArguments",
+ message:
+ r"""A constructor tear-off can't have type arguments after the constructor name.""",
+ tip:
+ r"""Try removing the type arguments or placing them after the class name.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeConstructorWithReturnType =
messageConstructorWithReturnType;
@@ -1775,8 +1787,9 @@
"ConstructorWithTypeArguments",
analyzerCodes: <String>["WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR"],
message:
- r"""A constructor invocation can't have type arguments on the constructor name.""",
- tip: r"""Try to place the type arguments on the class name.""");
+ r"""A constructor invocation can't have type arguments after the constructor name.""",
+ tip:
+ r"""Try removing the type arguments or placing them after the class name.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeConstructorWithTypeParameters =
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 432f847..c90bb31 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -6365,6 +6365,11 @@
if (operand is Generator) {
push(operand.applyTypeArguments(
openAngleBracket.charOffset, typeArguments));
+ } else if (operand is StaticTearOff && operand.target.isFactory ||
+ operand is ConstructorTearOff ||
+ operand is RedirectingFactoryTearOff) {
+ push(buildProblem(fasta.messageConstructorTearOffWithTypeArguments,
+ openAngleBracket.charOffset, noLength));
} else {
push(new Instantiation(
toValue(operand), buildDartTypeArguments(typeArguments))
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index daf3f6c..0f446e2 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -150,6 +150,7 @@
ConstFieldWithoutInitializer/example: Fail
ConstructorNotFound/example: Fail
ConstructorNotSync/example: Fail
+ConstructorTearOffWithTypeArguments/analyzerCode: Fail
ContinueLabelNotTarget/example: Fail
ContinueOutsideOfLoop/part_wrapped_script1: Fail
ContinueOutsideOfLoop/script1: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 8795748..681d3b4 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -1625,8 +1625,8 @@
}
ConstructorWithTypeArguments:
- template: "A constructor invocation can't have type arguments on the constructor name."
- tip: "Try to place the type arguments on the class name."
+ template: "A constructor invocation can't have type arguments after the constructor name."
+ tip: "Try removing the type arguments or placing them after the class name."
analyzerCode: WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
script:
- "class C<X> { C.foo(); } bar() { new C.foo<int>(); }"
@@ -5262,3 +5262,11 @@
script: |
class A<X> { static f() {} }
main() => A<int>.f;
+
+
+ConstructorTearOffWithTypeArguments:
+ template: "A constructor tear-off can't have type arguments after the constructor name."
+ tip: "Try removing the type arguments or placing them after the class name."
+ experiments: constructor-tearoffs
+ script:
+ - "class C<X> { C.foo(); } bar() { C.foo<int>; }"
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart
new file mode 100644
index 0000000..7a71462
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2021, 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.
+
+class A<X> {
+ A.foo() {}
+ factory A.bar() => new A.foo();
+ factory A.baz() = A.bar;
+}
+
+test() {
+ List.filled; // Ok.
+ A.foo; // Ok.
+ A.bar; // Ok.
+ A.baz; // Ok.
+
+ List<int>.filled; // Ok.
+ A<int>.foo; // Ok.
+ A<int>.bar; // Ok.
+ A<int>.baz; // Ok.
+
+ List.filled<int>; // Error.
+ A.foo<int>; // Error.
+ A.bar<int>; // Error.
+ A.baz<int>; // Error.
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.strong.expect
new file mode 100644
index 0000000..837ac1a
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.strong.expect
@@ -0,0 +1,74 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:22:14: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// List.filled<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:23:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.foo<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:24:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.bar<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:25:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.baz<int>; // Error.
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ static final field dynamic _redirecting# = <dynamic>[self::A::baz]/*isLegacy*/;
+ constructor foo() → self::A<self::A::X%>
+ : super core::Object::•() {}
+ static factory bar<X extends core::Object? = dynamic>() → self::A<self::A::bar::X%>
+ return new self::A::foo<self::A::bar::X%>();
+ static factory baz<X extends core::Object? = dynamic>() → self::A<self::A::baz::X%>
+ return self::A::bar<self::A::baz::X%>();
+}
+static method test() → dynamic {
+ #C1;
+ #C2;
+ #C3;
+ #C4;
+ #C5;
+ #C6;
+ #C7;
+ #C8;
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:22:14: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ List.filled<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:23:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.foo<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:24:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.bar<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:25:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.baz<int>; // Error.
+ ^";
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = static-tearoff core::List::filled
+ #C2 = constructor-tearoff self::A::foo
+ #C3 = static-tearoff self::A::bar
+ #C4 = redirecting-factory-tearoff self::A::baz
+ #C5 = instantiation core::List::filled <core::int>
+ #C6 = instantiation self::A::foo <core::int>
+ #C7 = instantiation self::A::bar <core::int>
+ #C8 = instantiation self::A::baz <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.strong.transformed.expect
new file mode 100644
index 0000000..837ac1a
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.strong.transformed.expect
@@ -0,0 +1,74 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:22:14: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// List.filled<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:23:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.foo<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:24:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.bar<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:25:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.baz<int>; // Error.
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ static final field dynamic _redirecting# = <dynamic>[self::A::baz]/*isLegacy*/;
+ constructor foo() → self::A<self::A::X%>
+ : super core::Object::•() {}
+ static factory bar<X extends core::Object? = dynamic>() → self::A<self::A::bar::X%>
+ return new self::A::foo<self::A::bar::X%>();
+ static factory baz<X extends core::Object? = dynamic>() → self::A<self::A::baz::X%>
+ return self::A::bar<self::A::baz::X%>();
+}
+static method test() → dynamic {
+ #C1;
+ #C2;
+ #C3;
+ #C4;
+ #C5;
+ #C6;
+ #C7;
+ #C8;
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:22:14: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ List.filled<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:23:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.foo<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:24:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.bar<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:25:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.baz<int>; // Error.
+ ^";
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = static-tearoff core::List::filled
+ #C2 = constructor-tearoff self::A::foo
+ #C3 = static-tearoff self::A::bar
+ #C4 = redirecting-factory-tearoff self::A::baz
+ #C5 = instantiation core::List::filled <core::int>
+ #C6 = instantiation self::A::foo <core::int>
+ #C7 = instantiation self::A::bar <core::int>
+ #C8 = instantiation self::A::baz <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.textual_outline.expect
new file mode 100644
index 0000000..97889d6
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+class A<X> {
+ A.foo() {}
+ factory A.bar() => new A.foo();
+ factory A.baz() = A.bar;
+}
+
+test() {}
+main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..dd5c918
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+class A<X> {
+ A.foo() {}
+ factory A.bar() => new A.foo();
+ factory A.baz() = A.bar;
+}
+
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.weak.expect
new file mode 100644
index 0000000..1d39c74
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.weak.expect
@@ -0,0 +1,74 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:22:14: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// List.filled<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:23:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.foo<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:24:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.bar<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:25:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.baz<int>; // Error.
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ static final field dynamic _redirecting# = <dynamic>[self::A::baz]/*isLegacy*/;
+ constructor foo() → self::A<self::A::X%>
+ : super core::Object::•() {}
+ static factory bar<X extends core::Object? = dynamic>() → self::A<self::A::bar::X%>
+ return new self::A::foo<self::A::bar::X%>();
+ static factory baz<X extends core::Object? = dynamic>() → self::A<self::A::baz::X%>
+ return self::A::bar<self::A::baz::X%>();
+}
+static method test() → dynamic {
+ #C1;
+ #C2;
+ #C3;
+ #C4;
+ #C5;
+ #C6;
+ #C7;
+ #C8;
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:22:14: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ List.filled<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:23:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.foo<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:24:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.bar<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:25:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.baz<int>; // Error.
+ ^";
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = static-tearoff core::List::filled
+ #C2 = constructor-tearoff self::A::foo
+ #C3 = static-tearoff self::A::bar
+ #C4 = redirecting-factory-tearoff self::A::baz
+ #C5 = instantiation core::List::filled <core::int*>
+ #C6 = instantiation self::A::foo <core::int*>
+ #C7 = instantiation self::A::bar <core::int*>
+ #C8 = instantiation self::A::baz <core::int*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.weak.outline.expect
new file mode 100644
index 0000000..e724719
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.weak.outline.expect
@@ -0,0 +1,17 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ static final field dynamic _redirecting# = <dynamic>[self::A::baz]/*isLegacy*/;
+ constructor foo() → self::A<self::A::X%>
+ ;
+ static factory bar<X extends core::Object? = dynamic>() → self::A<self::A::bar::X%>
+ ;
+ static factory baz<X extends core::Object? = dynamic>() → self::A<self::A::baz::X%>
+ return self::A::bar<self::A::baz::X%>();
+}
+static method test() → dynamic
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.weak.transformed.expect
new file mode 100644
index 0000000..1d39c74
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/issue46890.dart.weak.transformed.expect
@@ -0,0 +1,74 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:22:14: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// List.filled<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:23:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.foo<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:24:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.bar<int>; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:25:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
+// A.baz<int>; // Error.
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object? = dynamic> extends core::Object {
+ static final field dynamic _redirecting# = <dynamic>[self::A::baz]/*isLegacy*/;
+ constructor foo() → self::A<self::A::X%>
+ : super core::Object::•() {}
+ static factory bar<X extends core::Object? = dynamic>() → self::A<self::A::bar::X%>
+ return new self::A::foo<self::A::bar::X%>();
+ static factory baz<X extends core::Object? = dynamic>() → self::A<self::A::baz::X%>
+ return self::A::bar<self::A::baz::X%>();
+}
+static method test() → dynamic {
+ #C1;
+ #C2;
+ #C3;
+ #C4;
+ #C5;
+ #C6;
+ #C7;
+ #C8;
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:22:14: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ List.filled<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:23:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.foo<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:24:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.bar<int>; // Error.
+ ^";
+ invalid-expression "pkg/front_end/testcases/constructor_tearoffs/issue46890.dart:25:8: Error: A constructor tear-off can't have type arguments after the constructor name.
+Try removing the type arguments or placing them after the class name.
+ A.baz<int>; // Error.
+ ^";
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = static-tearoff core::List::filled
+ #C2 = constructor-tearoff self::A::foo
+ #C3 = static-tearoff self::A::bar
+ #C4 = redirecting-factory-tearoff self::A::baz
+ #C5 = instantiation core::List::filled <core::int*>
+ #C6 = instantiation self::A::foo <core::int*>
+ #C7 = instantiation self::A::bar <core::int*>
+ #C8 = instantiation self::A::baz <core::int*>
+}
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect b/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect
index 5213933..67d25ff 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect
@@ -2,13 +2,13 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/regress/issue_34403.dart:16:14: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:16:14: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var c1 = C.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:18:18: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:18:18: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var c2 = new C.bar<int>();
// ^^^
//
@@ -17,23 +17,23 @@
// var c3 = C<String>.bar<int>();
// ^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:20:22: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:20:22: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var c3 = C<String>.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:22:26: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:22:26: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var c4 = new C<String>.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:25:16: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:25:16: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const d1 = D.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:27:22: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:27:22: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const d2 = const D.foo<int>();
// ^^^
//
@@ -42,23 +42,23 @@
// const d3 = D<String>.foo<int>();
// ^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:29:24: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:29:24: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const d3 = D<String>.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:31:30: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:31:30: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const d4 = const D<String>.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:34:16: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:34:16: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var e1 = p.E.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:36:20: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:36:20: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var e2 = new p.E.bar<int>();
// ^^^
//
@@ -67,23 +67,23 @@
// var e3 = p.E<String>.bar<int>();
// ^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:38:24: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:38:24: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var e3 = p.E<String>.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:40:28: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:40:28: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var e4 = new p.E<String>.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:43:18: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:43:18: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const f1 = p.F.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:45:24: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:45:24: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const f2 = const p.F.foo<int>();
// ^^^
//
@@ -92,13 +92,13 @@
// const f3 = p.F<String>.foo<int>();
// ^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:47:26: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:47:26: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const f3 = p.F<String>.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:49:32: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:49:32: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const f4 = const p.F<String>.foo<int>();
// ^^^
//
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect
index 5213933..67d25ff 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect
@@ -2,13 +2,13 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/regress/issue_34403.dart:16:14: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:16:14: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var c1 = C.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:18:18: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:18:18: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var c2 = new C.bar<int>();
// ^^^
//
@@ -17,23 +17,23 @@
// var c3 = C<String>.bar<int>();
// ^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:20:22: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:20:22: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var c3 = C<String>.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:22:26: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:22:26: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var c4 = new C<String>.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:25:16: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:25:16: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const d1 = D.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:27:22: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:27:22: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const d2 = const D.foo<int>();
// ^^^
//
@@ -42,23 +42,23 @@
// const d3 = D<String>.foo<int>();
// ^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:29:24: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:29:24: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const d3 = D<String>.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:31:30: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:31:30: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const d4 = const D<String>.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:34:16: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:34:16: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var e1 = p.E.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:36:20: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:36:20: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var e2 = new p.E.bar<int>();
// ^^^
//
@@ -67,23 +67,23 @@
// var e3 = p.E<String>.bar<int>();
// ^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:38:24: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:38:24: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var e3 = p.E<String>.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:40:28: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:40:28: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// var e4 = new p.E<String>.bar<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:43:18: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:43:18: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const f1 = p.F.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:45:24: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:45:24: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const f2 = const p.F.foo<int>();
// ^^^
//
@@ -92,13 +92,13 @@
// const f3 = p.F<String>.foo<int>();
// ^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:47:26: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:47:26: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const f3 = p.F<String>.foo<int>();
// ^^^
//
-// pkg/front_end/testcases/regress/issue_34403.dart:49:32: Error: A constructor invocation can't have type arguments on the constructor name.
-// Try to place the type arguments on the class name.
+// pkg/front_end/testcases/regress/issue_34403.dart:49:32: Error: A constructor invocation can't have type arguments after the constructor name.
+// Try removing the type arguments or placing them after the class name.
// const f4 = const p.F<String>.foo<int>();
// ^^^
//
diff --git a/tests/language/constructor/named_constructor_test.dart b/tests/language/constructor/named_constructor_test.dart
index 3b8af32..dec22c8 100644
--- a/tests/language/constructor/named_constructor_test.dart
+++ b/tests/language/constructor/named_constructor_test.dart
@@ -22,7 +22,7 @@
// 'Class.named' is not a type:
new Class.named<int>().value;
// ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
@@ -30,7 +30,7 @@
new Class<int>.named<int>().value;
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
new prefix.Class().value;
// 'prefix' is not a type:
@@ -46,7 +46,7 @@
// [cfe] Method not found: 'prefix.Class'.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
new prefix.Class.named().value;
// 'prefix<int>.Class.named' doesn't fit the grammar syntax T.id:
@@ -65,7 +65,7 @@
new prefix.Class.named<int>().value;
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
new prefix<int>.Class<int>.named().value;
@@ -74,7 +74,7 @@
// [cfe] Method not found: 'prefix.Class'.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// 'prefix<int>.Class.named<int>' doesn't fit the grammar syntax T.id:
@@ -91,7 +91,7 @@
new prefix.Class<int>.named<int>().value;
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// 'prefix<int>.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
new prefix<int>.Class<int>.named<int>().value;
@@ -100,5 +100,5 @@
// [cfe] Method not found: 'prefix.Class'.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
}
diff --git a/tests/language/constructor/reference_test.dart b/tests/language/constructor/reference_test.dart
index 3755880..46892bb 100644
--- a/tests/language/constructor/reference_test.dart
+++ b/tests/language/constructor/reference_test.dart
@@ -27,14 +27,14 @@
// [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
new Foo.bar<int>();
// ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
new Foo.bar<int>.baz();
- // ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
+ // ^
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^
// [cfe] Method not found: 'Foo.bar.baz'.
new Foo.bar.baz<int>();
@@ -42,8 +42,7 @@
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
// ^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
- // ^
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// [cfe] Method not found: 'Foo.bar.baz'.
const Foo();
@@ -64,14 +63,14 @@
// [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
const Foo.bar<int>();
// ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
const Foo.bar<int>.baz();
- // ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
+ // ^
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^
// [cfe] Method not found: 'Foo.bar.baz'.
const Foo.bar.baz<int>();
@@ -79,42 +78,41 @@
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
// ^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
- // ^
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// [cfe] Method not found: 'Foo.bar.baz'.
Foo();
Foo.bar();
Foo.bar.baz();
- // ^^^
- // [cfe] Getter not found: 'bar'.
- // ^^^
- // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+// ^
+// [cfe] Getter not found: 'bar'.
+// ^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
Foo<int>();
Foo<int>.bar();
Foo<int>.bar.baz();
// ^^^^^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
// [cfe] This requires the 'constructor-tearoffs' language feature to be enabled.
- // ^^^
- // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
// ^
// [cfe] Getter not found: 'bar'.
+ // ^^^
+ // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
Foo.bar<int>();
// ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
Foo.bar<int>.baz();
- // ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
//^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
- // ^
- // [cfe] Method not found: 'Foo.bar.baz'.
+// ^
+// [cfe] A constructor invocation can't have type arguments after the constructor name.
+// ^
+// [cfe] Method not found: 'Foo.bar.baz'.
Foo.bar.baz<int>();
- // ^^^
- // [cfe] Getter not found: 'bar'.
- // ^^^
- // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+// ^
+// [cfe] Getter not found: 'bar'.
+// ^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
}
diff --git a/tests/language/nonfunction_type_aliases/mixed/usage_object_error_test.dart b/tests/language/nonfunction_type_aliases/mixed/usage_object_error_test.dart
index af098be..505ab32 100644
--- a/tests/language/nonfunction_type_aliases/mixed/usage_object_error_test.dart
+++ b/tests/language/nonfunction_type_aliases/mixed/usage_object_error_test.dart
@@ -28,28 +28,27 @@
abstract class D2 extends C with T {}
// ^
// [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] Can't use 'Object' as a mixin because it has constructors.
abstract class D3 implements T {}
// ^
// [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] 'Object' can't be used in both 'extends' and 'implements' clauses.
abstract class D4 = C with T;
// ^
// [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] Can't use 'Object' as a mixin because it has constructors.
main() {
T.named();
// ^^^^^
// [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] Method not found: 'Object.named'.
T.staticMethod<T>();
// ^^^^^^^^^^^^
// [analyzer] unspecified
+// [cfe] A constructor invocation can't have type arguments after the constructor name.
// [cfe] Method not found: 'Object.staticMethod'.
-// ^^^^^^^^^^^^
-// [cfe] A constructor invocation can't have type arguments on the constructor name.
}
diff --git a/tests/language/nonfunction_type_aliases/usage_object_error_test.dart b/tests/language/nonfunction_type_aliases/usage_object_error_test.dart
index 8fad251..1046f6e 100644
--- a/tests/language/nonfunction_type_aliases/usage_object_error_test.dart
+++ b/tests/language/nonfunction_type_aliases/usage_object_error_test.dart
@@ -25,28 +25,27 @@
abstract class D2 extends C with T {}
// ^
// [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] Can't use 'Object' as a mixin because it has constructors.
abstract class D3 implements T {}
// ^
// [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] 'Object' can't be used in both 'extends' and 'implements' clauses.
abstract class D4 = C with T;
// ^
// [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] Can't use 'Object' as a mixin because it has constructors.
main() {
T.named();
// ^^^^^
// [analyzer] unspecified
-// [cfe] unspecified
+// [cfe] Method not found: 'Object.named'.
T.staticMethod<T>();
// ^^^^^^^^^^^^
// [analyzer] unspecified
+// [cfe] A constructor invocation can't have type arguments after the constructor name.
// [cfe] Method not found: 'Object.staticMethod'.
-// ^^^^^^^^^^^^
-// [cfe] A constructor invocation can't have type arguments on the constructor name.
}
diff --git a/tests/language_2/constructor/named_constructor_test.dart b/tests/language_2/constructor/named_constructor_test.dart
index c36fe22..378c9b2 100644
--- a/tests/language_2/constructor/named_constructor_test.dart
+++ b/tests/language_2/constructor/named_constructor_test.dart
@@ -24,7 +24,7 @@
// 'Class.named' is not a type:
new Class.named<int>().value;
// ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
@@ -32,7 +32,7 @@
new Class<int>.named<int>().value;
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
new prefix.Class().value;
// 'prefix' is not a type:
@@ -48,7 +48,7 @@
// [cfe] Method not found: 'prefix.Class'.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
new prefix.Class.named().value;
// 'prefix<int>.Class.named' doesn't fit the grammar syntax T.id:
@@ -67,7 +67,7 @@
new prefix.Class.named<int>().value;
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
new prefix<int>.Class<int>.named().value;
@@ -76,7 +76,7 @@
// [cfe] Method not found: 'prefix.Class'.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// 'prefix<int>.Class.named<int>' doesn't fit the grammar syntax T.id:
@@ -93,7 +93,7 @@
new prefix.Class<int>.named<int>().value;
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// 'prefix<int>.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
new prefix<int>.Class<int>.named<int>().value;
@@ -102,5 +102,5 @@
// [cfe] Method not found: 'prefix.Class'.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
}
diff --git a/tests/language_2/constructor/reference_test.dart b/tests/language_2/constructor/reference_test.dart
index 03d4c56..ec284ab 100644
--- a/tests/language_2/constructor/reference_test.dart
+++ b/tests/language_2/constructor/reference_test.dart
@@ -29,14 +29,14 @@
// [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
new Foo.bar<int>();
// ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
new Foo.bar<int>.baz();
- // ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
+ // ^
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^
// [cfe] Method not found: 'Foo.bar.baz'.
new Foo.bar.baz<int>();
@@ -44,8 +44,7 @@
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
// ^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
- // ^
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// [cfe] Method not found: 'Foo.bar.baz'.
const Foo();
@@ -66,14 +65,14 @@
// [cfe] The method 'baz' isn't defined for the class 'Foo<int>'.
const Foo.bar<int>();
// ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
const Foo.bar<int>.baz();
- // ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
+ // ^
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^
// [cfe] Method not found: 'Foo.bar.baz'.
const Foo.bar.baz<int>();
@@ -81,42 +80,41 @@
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
// ^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
- // ^
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// [cfe] Method not found: 'Foo.bar.baz'.
Foo();
Foo.bar();
Foo.bar.baz();
- // ^^^
- // [cfe] Getter not found: 'bar'.
- // ^^^
- // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+// ^
+// [cfe] Getter not found: 'bar'.
+// ^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
Foo<int>();
Foo<int>.bar();
Foo<int>.bar.baz();
// ^^^^^
// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
// [cfe] This requires the 'constructor-tearoffs' language feature to be enabled.
- // ^^^
- // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
// ^
// [cfe] Getter not found: 'bar'.
+ // ^^^
+ // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
Foo.bar<int>();
// ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
+ // [cfe] A constructor invocation can't have type arguments after the constructor name.
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
Foo.bar<int>.baz();
- // ^
- // [cfe] A constructor invocation can't have type arguments on the constructor name.
//^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
- // ^
- // [cfe] Method not found: 'Foo.bar.baz'.
+// ^
+// [cfe] A constructor invocation can't have type arguments after the constructor name.
+// ^
+// [cfe] Method not found: 'Foo.bar.baz'.
Foo.bar.baz<int>();
- // ^^^
- // [cfe] Getter not found: 'bar'.
- // ^^^
- // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
+// ^
+// [cfe] Getter not found: 'bar'.
+// ^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
}
diff --git a/tools/VERSION b/tools/VERSION
index 509fc40..798680b 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 15
PATCH 0
-PRERELEASE 43
+PRERELEASE 44
PRERELEASE_PATCH 0
\ No newline at end of file