Version 2.14.0-296.0.dev
Merge commit '1b3b8f8a8412315d5e545ddc7b4d12c62f41d728' into 'dev'
diff --git a/DEPS b/DEPS
index ccced0b..fd75d7b 100644
--- a/DEPS
+++ b/DEPS
@@ -141,7 +141,7 @@
"pool_rev": "7abe634002a1ba8a0928eded086062f1307ccfae",
"process_rev": "56ece43b53b64c63ae51ec184b76bd5360c28d0b",
"protobuf_rev": "0d03fd588df69e9863e2a2efc0059dee8f18d5b2",
- "pub_rev": "3c14d86a67db7207bbc9f654ac49ee60e08e5240",
+ "pub_rev": "d159e5b9f04a7e4826b6afea7b3364d48aa0dad8",
"pub_semver_rev": "f50d80ef10c4b2fa5f4c8878036a4d9342c0cc82",
"resource_rev": "6b79867d0becf5395e5819a75720963b8298e9a7",
"root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index 9789db1..e9f71c5 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -3112,12 +3112,18 @@
if (member == null) {
// If we find a setter, [member] is an [AccessErrorBuilder], not null.
if (send is IncompletePropertyAccessGenerator) {
+ assert(
+ send.typeArguments == null,
+ "Unexpected non-null typeArguments of "
+ "an IncompletePropertyAccessGenerator object: "
+ "'${send.typeArguments.runtimeType}'.");
if (_helper.enableConstructorTearOffsInLibrary &&
declarationBuilder is ClassBuilder) {
MemberBuilder? constructor =
declarationBuilder.findConstructorOrFactory(
name.text, nameOffset, _uri, _helper.libraryBuilder);
Member? tearOff = constructor?.readTarget;
+ Expression? tearOffExpression;
if (tearOff is Constructor) {
if (declarationBuilder.isAbstract) {
return _helper.buildProblem(
@@ -3125,13 +3131,23 @@
nameOffset,
name.text.length);
}
- return _helper.forest
+ tearOffExpression = _helper.forest
.createConstructorTearOff(token.charOffset, tearOff);
} else if (tearOff is Procedure) {
- return _helper.forest
- .createStaticTearOff(token.charOffset, tearOff);
+ tearOffExpression =
+ _helper.forest.createStaticTearOff(token.charOffset, tearOff);
+ } else if (tearOff != null) {
+ unhandled("${tearOff.runtimeType}", "buildPropertyAccess",
+ operatorOffset, _helper.uri);
}
- // TODO(dmitryas): Add support for factories.
+ if (tearOffExpression != null) {
+ return typeArguments != null
+ ? _helper.forest.createInstantiation(
+ token.charOffset,
+ tearOffExpression,
+ _helper.buildDartTypeArguments(typeArguments))
+ : tearOffExpression;
+ }
}
generator = new UnresolvedNameGenerator(_helper, send.token, name);
} else {
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart
index 75d9371..0a6909a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forest.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -838,6 +838,14 @@
assert(fileOffset != null);
return new StaticTearOff(procedure)..fileOffset = fileOffset;
}
+
+ Instantiation createInstantiation(
+ int fileOffset, Expression expression, List<DartType> typeArguments) {
+ // ignore: unnecessary_null_comparison
+ assert(fileOffset != null);
+ return new Instantiation(expression, typeArguments)
+ ..fileOffset = fileOffset;
+ }
}
class _VariablesDeclaration extends Statement {
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect
index a63e674..3ac9d56 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect
@@ -16,31 +16,33 @@
// A<X> Function<X>(X) test3() => A.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
// A<X> Function<X>(X) test4() => A<int>.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
-// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
// A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
// A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
-// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
// A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
// ^
//
@@ -82,41 +84,39 @@
A<X> Function<X>(X) test3() => A.new; // Error.
^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test4() => A<int>.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (self::A::•<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^";
static method test6() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
+ ^" in (self::A::foo1<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
+ ^";
static method test8() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (self::A::foo2<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^";
static method test10() → <X extends core::Object? = dynamic>() → self::A<X%>
return self::A::bar1;
static method test11() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t7 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect
index a63e674..3ac9d56 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect
@@ -16,31 +16,33 @@
// A<X> Function<X>(X) test3() => A.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
// A<X> Function<X>(X) test4() => A<int>.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
-// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
// A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
// A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
-// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
// A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
// ^
//
@@ -82,41 +84,39 @@
A<X> Function<X>(X) test3() => A.new; // Error.
^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test4() => A<int>.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (self::A::•<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^";
static method test6() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
+ ^" in (self::A::foo1<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
+ ^";
static method test8() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (self::A::foo2<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^";
static method test10() → <X extends core::Object? = dynamic>() → self::A<X%>
return self::A::bar1;
static method test11() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t7 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect
index a63e674..3ac9d56 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect
@@ -16,31 +16,33 @@
// A<X> Function<X>(X) test3() => A.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
// A<X> Function<X>(X) test4() => A<int>.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
-// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
// A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
// A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
-// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
// A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
// ^
//
@@ -82,41 +84,39 @@
A<X> Function<X>(X) test3() => A.new; // Error.
^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test4() => A<int>.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (self::A::•<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^";
static method test6() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
+ ^" in (self::A::foo1<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
+ ^";
static method test8() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (self::A::foo2<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^";
static method test10() → <X extends core::Object? = dynamic>() → self::A<X%>
return self::A::bar1;
static method test11() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t7 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect
index a63e674..3ac9d56 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect
@@ -16,31 +16,33 @@
// A<X> Function<X>(X) test3() => A.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
// A<X> Function<X>(X) test4() => A<int>.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
-// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
// A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
// A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
-// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*2*/' is from 'unknown'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
// A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
// ^
//
@@ -82,41 +84,39 @@
A<X> Function<X>(X) test3() => A.new; // Error.
^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test4() => A<int>.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (self::A::•<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^";
static method test6() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
+ ^" in (self::A::foo1<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
+ ^";
static method test8() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (self::A::foo2<core::int>) as{TypeError,ForNonNullableByDefault} Never;
static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: A value of type 'A<X/*1*/> Function<X>(X/*1*/, int)' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*2*/' is from 'unknown'.
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^";
static method test10() → <X extends core::Object? = dynamic>() → self::A<X%>
return self::A::bar1;
static method test11() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return let final Never #t7 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
+ return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.expect
index c6fd6e0..b9ace2c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.expect
@@ -1,4 +1,22 @@
library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testFooExtraArgs() => A<int, String>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:19:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testNewExtraArgs() => A<int, String>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:20:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testBarExtraArgs() => A<int, String>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -13,19 +31,28 @@
static method testFoo() → dynamic
return self::A::foo;
static method testFooArgs() → dynamic
- return self::A::foo;
+ return self::A::foo<core::int>;
static method testNew() → dynamic
return self::A::•;
static method testNewArgs() → dynamic
- return self::A::•;
+ return self::A::•<core::int>;
static method testBar() → dynamic
return self::A::bar;
static method testBarArgs() → dynamic
- return self::A::bar;
+ return self::A::bar<core::int>;
static method testFooExtraArgs() → dynamic
- return self::A::foo;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testFooExtraArgs() => A<int, String>.foo; // Error.
+ ^";
static method testNewExtraArgs() → dynamic
- return self::A::•;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:19:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testNewExtraArgs() => A<int, String>.new; // Error.
+ ^";
static method testBarExtraArgs() → dynamic
- return self::A::bar;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:20:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testBarExtraArgs() => A<int, String>.bar; // Error.
+ ^";
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.transformed.expect
index c6fd6e0..b9ace2c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.transformed.expect
@@ -1,4 +1,22 @@
library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testFooExtraArgs() => A<int, String>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:19:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testNewExtraArgs() => A<int, String>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:20:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testBarExtraArgs() => A<int, String>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -13,19 +31,28 @@
static method testFoo() → dynamic
return self::A::foo;
static method testFooArgs() → dynamic
- return self::A::foo;
+ return self::A::foo<core::int>;
static method testNew() → dynamic
return self::A::•;
static method testNewArgs() → dynamic
- return self::A::•;
+ return self::A::•<core::int>;
static method testBar() → dynamic
return self::A::bar;
static method testBarArgs() → dynamic
- return self::A::bar;
+ return self::A::bar<core::int>;
static method testFooExtraArgs() → dynamic
- return self::A::foo;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testFooExtraArgs() => A<int, String>.foo; // Error.
+ ^";
static method testNewExtraArgs() → dynamic
- return self::A::•;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:19:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testNewExtraArgs() => A<int, String>.new; // Error.
+ ^";
static method testBarExtraArgs() → dynamic
- return self::A::bar;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:20:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testBarExtraArgs() => A<int, String>.bar; // Error.
+ ^";
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.expect
index c6fd6e0..b9ace2c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.expect
@@ -1,4 +1,22 @@
library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testFooExtraArgs() => A<int, String>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:19:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testNewExtraArgs() => A<int, String>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:20:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testBarExtraArgs() => A<int, String>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -13,19 +31,28 @@
static method testFoo() → dynamic
return self::A::foo;
static method testFooArgs() → dynamic
- return self::A::foo;
+ return self::A::foo<core::int>;
static method testNew() → dynamic
return self::A::•;
static method testNewArgs() → dynamic
- return self::A::•;
+ return self::A::•<core::int>;
static method testBar() → dynamic
return self::A::bar;
static method testBarArgs() → dynamic
- return self::A::bar;
+ return self::A::bar<core::int>;
static method testFooExtraArgs() → dynamic
- return self::A::foo;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testFooExtraArgs() => A<int, String>.foo; // Error.
+ ^";
static method testNewExtraArgs() → dynamic
- return self::A::•;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:19:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testNewExtraArgs() => A<int, String>.new; // Error.
+ ^";
static method testBarExtraArgs() → dynamic
- return self::A::bar;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:20:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testBarExtraArgs() => A<int, String>.bar; // Error.
+ ^";
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.transformed.expect
index c6fd6e0..b9ace2c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.transformed.expect
@@ -1,4 +1,22 @@
library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testFooExtraArgs() => A<int, String>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:19:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testNewExtraArgs() => A<int, String>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:20:23: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// testBarExtraArgs() => A<int, String>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -13,19 +31,28 @@
static method testFoo() → dynamic
return self::A::foo;
static method testFooArgs() → dynamic
- return self::A::foo;
+ return self::A::foo<core::int>;
static method testNew() → dynamic
return self::A::•;
static method testNewArgs() → dynamic
- return self::A::•;
+ return self::A::•<core::int>;
static method testBar() → dynamic
return self::A::bar;
static method testBarArgs() → dynamic
- return self::A::bar;
+ return self::A::bar<core::int>;
static method testFooExtraArgs() → dynamic
- return self::A::foo;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testFooExtraArgs() => A<int, String>.foo; // Error.
+ ^";
static method testNewExtraArgs() → dynamic
- return self::A::•;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:19:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testNewExtraArgs() => A<int, String>.new; // Error.
+ ^";
static method testBarExtraArgs() → dynamic
- return self::A::bar;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:20:23: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+testBarExtraArgs() => A<int, String>.bar; // Error.
+ ^";
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.expect
index 96005b5..f6db3b2 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.expect
@@ -1,4 +1,25 @@
library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testFooExtraArgs() => A<int>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testNewExtraArgs() => A<int>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testBarExtraArgs() => A<int>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -17,9 +38,21 @@
static method testBar() → dynamic
return self::A::bar;
static method testFooExtraArgs() → dynamic
- return self::A::foo;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testFooExtraArgs() => A<int>.foo; // Error.
+ ^";
static method testNewExtraArgs() → dynamic
- return self::A::•;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testNewExtraArgs() => A<int>.new; // Error.
+ ^";
static method testBarExtraArgs() → dynamic
- return self::A::bar;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testBarExtraArgs() => A<int>.bar; // Error.
+ ^";
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.transformed.expect
index 96005b5..f6db3b2 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.transformed.expect
@@ -1,4 +1,25 @@
library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testFooExtraArgs() => A<int>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testNewExtraArgs() => A<int>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testBarExtraArgs() => A<int>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -17,9 +38,21 @@
static method testBar() → dynamic
return self::A::bar;
static method testFooExtraArgs() → dynamic
- return self::A::foo;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testFooExtraArgs() => A<int>.foo; // Error.
+ ^";
static method testNewExtraArgs() → dynamic
- return self::A::•;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testNewExtraArgs() => A<int>.new; // Error.
+ ^";
static method testBarExtraArgs() → dynamic
- return self::A::bar;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testBarExtraArgs() => A<int>.bar; // Error.
+ ^";
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.expect
index 96005b5..f6db3b2 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.expect
@@ -1,4 +1,25 @@
library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testFooExtraArgs() => A<int>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testNewExtraArgs() => A<int>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testBarExtraArgs() => A<int>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -17,9 +38,21 @@
static method testBar() → dynamic
return self::A::bar;
static method testFooExtraArgs() → dynamic
- return self::A::foo;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testFooExtraArgs() => A<int>.foo; // Error.
+ ^";
static method testNewExtraArgs() → dynamic
- return self::A::•;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testNewExtraArgs() => A<int>.new; // Error.
+ ^";
static method testBarExtraArgs() → dynamic
- return self::A::bar;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testBarExtraArgs() => A<int>.bar; // Error.
+ ^";
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.transformed.expect
index 96005b5..f6db3b2 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.transformed.expect
@@ -1,4 +1,25 @@
library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testFooExtraArgs() => A<int>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testNewExtraArgs() => A<int>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+// Try changing the operand or remove the type arguments.
+// testBarExtraArgs() => A<int>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -17,9 +38,21 @@
static method testBar() → dynamic
return self::A::bar;
static method testFooExtraArgs() → dynamic
- return self::A::foo;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testFooExtraArgs() => A<int>.foo; // Error.
+ ^";
static method testNewExtraArgs() → dynamic
- return self::A::•;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:16:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testNewExtraArgs() => A<int>.new; // Error.
+ ^";
static method testBarExtraArgs() → dynamic
- return self::A::bar;
+ return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:17:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
+Try changing the operand or remove the type arguments.
+testBarExtraArgs() => A<int>.bar; // Error.
+ ^";
static method main() → dynamic {}
diff --git a/tools/VERSION b/tools/VERSION
index 4dd96b4..3a978e0 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 295
+PRERELEASE 296
PRERELEASE_PATCH 0
\ No newline at end of file