Version 2.14.0-283.0.dev
Merge commit '5a9ffe55a86204ad3868a53877e658abccbca66a' into 'dev'
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 716581a..e0342ae 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -452,6 +452,11 @@
return libraryBuilder.enableConstFunctionsInLibrary;
}
+ @override
+ bool get enableConstructorTearOffsInLibrary {
+ return libraryBuilder.enableConstructorTearOffsInLibrary;
+ }
+
void _enterLocalState({bool inLateLocalInitializer: false}) {
_localInitializerState =
_localInitializerState.prepend(inLateLocalInitializer);
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 e931ccc..cbe266a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -15,6 +15,8 @@
import 'package:kernel/ast.dart';
import '../builder/builder.dart';
+import '../builder/class_builder.dart';
+import '../builder/constructor_builder.dart';
import '../builder/declaration_builder.dart';
import '../builder/extension_builder.dart';
import '../builder/invalid_type_declaration_builder.dart';
@@ -3080,7 +3082,24 @@
if (member == null) {
// If we find a setter, [member] is an [AccessErrorBuilder], not null.
if (send is IncompletePropertyAccessGenerator) {
- generator = new UnresolvedNameGenerator(_helper, send.token, name);
+ if (_helper.enableConstructorTearOffsInLibrary &&
+ declarationBuilder is ClassBuilder) {
+ Builder constructor = declarationBuilder.findConstructorOrFactory(
+ name.text,
+ offsetForToken(send.token),
+ _uri,
+ _helper.libraryBuilder);
+ if (constructor is ConstructorBuilder) {
+ return _helper.forest.createConstructorTearOff(
+ token.charOffset, constructor.constructor);
+ } else {
+ // TODO(dmitryas): Add support for factories.
+ generator =
+ new UnresolvedNameGenerator(_helper, send.token, name);
+ }
+ } else {
+ generator = new UnresolvedNameGenerator(_helper, send.token, name);
+ }
} else {
return _helper.buildConstructorInvocation(
declaration,
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
index b333c17..79ff03f 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
@@ -66,6 +66,8 @@
bool get enableConstFunctionsInLibrary;
+ bool get enableConstructorTearOffsInLibrary;
+
scopeLookup(Scope scope, String name, Token token,
{bool isQualified: false, PrefixBuilder prefix});
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart
index 441c09f..f6be413 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forest.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -752,6 +752,12 @@
assert(fileOffset != null);
return new ParenthesizedExpression(expression)..fileOffset = fileOffset;
}
+
+ ConstructorTearOff createConstructorTearOff(
+ int fileOffset, Constructor constructor) {
+ assert(fileOffset != null);
+ return new ConstructorTearOff(constructor)..fileOffset = fileOffset;
+ }
}
class _VariablesDeclaration extends Statement {
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index cb1d27c..fb20d2f 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -217,7 +217,9 @@
@override
ExpressionInferenceResult visitConstructorTearOff(
ConstructorTearOff node, DartType typeContext) {
- return _unhandledExpression(node, typeContext);
+ DartType type = node.constructor.function
+ .computeFunctionType(inferrer.library.nonNullable);
+ return inferrer.instantiateTearOff(type, typeContext, node);
}
@override
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 b9e60e0..4dc6864 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
@@ -2,13 +2,12 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:11:34: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test1() => A.foo1; // Ok.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12:34: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12: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'.
// A<X> Function<X>(X) test2() => A.foo2; // Error.
-// ^^^^
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13:34: Error: Getter not found: 'new'.
// A<X> Function<X>(X) test3() => A.new; // Error.
@@ -22,21 +21,19 @@
// A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:39: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:47: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:39: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18: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'.
// A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
-// ^^^^
+// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:47: Error: Getter not found: 'foo2'.
+// 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*/)'.
+// - '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) test9() => A<int, String>.foo2; // Error.
-// ^^^^
+// ^
//
import self as self;
import "dart:core" as core;
@@ -51,13 +48,14 @@
;
}
static method test1() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:11:34: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test1() => A.foo1; // Ok.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ return self::A::foo1;
static method test2() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12:34: Error: Getter not found: 'foo2'.
+ return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12: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'.
A<X> Function<X>(X) test2() => A.foo2; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13:34: Error: Getter not found: 'new'.
A<X> Function<X>(X) test3() => A.new; // Error.
@@ -71,19 +69,21 @@
A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
static method test6() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:39: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ return self::A::foo1;
static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:47: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ return self::A::foo1;
static method test8() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:39: Error: Getter not found: 'foo2'.
+ return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18: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'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:47: Error: Getter not found: 'foo2'.
+ return let final Never #t3 = 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*/)'.
+ - '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) test9() => A<int, String>.foo2; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method main() → dynamic {}
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 216d862..b7f501c 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
@@ -2,13 +2,12 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:11:34: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test1() => A.foo1; // Ok.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12:34: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12: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'.
// A<X> Function<X>(X) test2() => A.foo2; // Error.
-// ^^^^
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13:34: Error: Getter not found: 'new'.
// A<X> Function<X>(X) test3() => A.new; // Error.
@@ -22,21 +21,19 @@
// A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:39: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:47: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:39: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18: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'.
// A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
-// ^^^^
+// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:47: Error: Getter not found: 'foo2'.
+// 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*/)'.
+// - '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) test9() => A<int, String>.foo2; // Error.
-// ^^^^
+// ^
//
import self as self;
import "dart:core" as core;
@@ -51,13 +48,14 @@
;
}
static method test1() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:11:34: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test1() => A.foo1; // Ok.
- ^^^^";
+ return self::A::foo1;
static method test2() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12:34: Error: Getter not found: 'foo2'.
+ return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12: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'.
A<X> Function<X>(X) test2() => A.foo2; // Error.
- ^^^^";
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13:34: Error: Getter not found: 'new'.
A<X> Function<X>(X) test3() => A.new; // Error.
@@ -71,19 +69,21 @@
A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
^^^";
static method test6() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:39: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
- ^^^^";
+ return self::A::foo1;
static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:47: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
- ^^^^";
+ return self::A::foo1;
static method test8() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:39: Error: Getter not found: 'foo2'.
+ return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18: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'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^^^^";
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:47: Error: Getter not found: 'foo2'.
+ return let final Never #t3 = 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*/)'.
+ - '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) test9() => A<int, String>.foo2; // Error.
- ^^^^";
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method main() → dynamic {}
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 b9e60e0..4dc6864 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
@@ -2,13 +2,12 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:11:34: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test1() => A.foo1; // Ok.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12:34: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12: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'.
// A<X> Function<X>(X) test2() => A.foo2; // Error.
-// ^^^^
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13:34: Error: Getter not found: 'new'.
// A<X> Function<X>(X) test3() => A.new; // Error.
@@ -22,21 +21,19 @@
// A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:39: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:47: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:39: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18: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'.
// A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
-// ^^^^
+// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:47: Error: Getter not found: 'foo2'.
+// 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*/)'.
+// - '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) test9() => A<int, String>.foo2; // Error.
-// ^^^^
+// ^
//
import self as self;
import "dart:core" as core;
@@ -51,13 +48,14 @@
;
}
static method test1() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:11:34: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test1() => A.foo1; // Ok.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ return self::A::foo1;
static method test2() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12:34: Error: Getter not found: 'foo2'.
+ return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12: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'.
A<X> Function<X>(X) test2() => A.foo2; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13:34: Error: Getter not found: 'new'.
A<X> Function<X>(X) test3() => A.new; // Error.
@@ -71,19 +69,21 @@
A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
static method test6() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:39: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ return self::A::foo1;
static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:47: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ return self::A::foo1;
static method test8() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:39: Error: Getter not found: 'foo2'.
+ return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18: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'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:47: Error: Getter not found: 'foo2'.
+ return let final Never #t3 = 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*/)'.
+ - '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) test9() => A<int, String>.foo2; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} <X extends core::Object? = dynamic>(X%) → self::A<X%>;
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method main() → dynamic {}
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 216d862..b7f501c 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
@@ -2,13 +2,12 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:11:34: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test1() => A.foo1; // Ok.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12:34: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12: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'.
// A<X> Function<X>(X) test2() => A.foo2; // Error.
-// ^^^^
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13:34: Error: Getter not found: 'new'.
// A<X> Function<X>(X) test3() => A.new; // Error.
@@ -22,21 +21,19 @@
// A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:39: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:47: Error: Getter not found: 'foo1'.
-// A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:39: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18: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'.
// A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
-// ^^^^
+// ^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:47: Error: Getter not found: 'foo2'.
+// 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*/)'.
+// - '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) test9() => A<int, String>.foo2; // Error.
-// ^^^^
+// ^
//
import self as self;
import "dart:core" as core;
@@ -51,13 +48,14 @@
;
}
static method test1() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:11:34: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test1() => A.foo1; // Ok.
- ^^^^";
+ return self::A::foo1;
static method test2() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12:34: Error: Getter not found: 'foo2'.
+ return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:12: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'.
A<X> Function<X>(X) test2() => A.foo2; // Error.
- ^^^^";
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13:34: Error: Getter not found: 'new'.
A<X> Function<X>(X) test3() => A.new; // Error.
@@ -71,19 +69,21 @@
A<X> Function<X>(X) test5() => A<int, String>.new; // Error.
^^^";
static method test6() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:39: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
- ^^^^";
+ return self::A::foo1;
static method test7() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:47: Error: Getter not found: 'foo1'.
-A<X> Function<X>(X) test7() => A<int, String>.foo1; // Error.
- ^^^^";
+ return self::A::foo1;
static method test8() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18:39: Error: Getter not found: 'foo2'.
+ return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:18: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'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^^^^";
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method test9() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:47: Error: Getter not found: 'foo2'.
+ return let final Never #t3 = 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*/)'.
+ - '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) test9() => A<int, String>.foo2; // Error.
- ^^^^";
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
static method main() → dynamic {}
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 bc6e6db..75dc4d2 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
@@ -2,14 +2,6 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-// testFoo() => A.foo; // Ok.
-// ^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:11:25: Error: Getter not found: 'foo'.
-// testFooArgs() => A<int>.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:12:16: Error: Getter not found: 'new'.
// testNew() => A.new; // Ok.
// ^^^
@@ -18,10 +10,6 @@
// testNewArgs() => A<int>.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:15:38: Error: Getter not found: 'foo'.
-// testFooExtraArgs() => A<int, String>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:16:38: Error: Getter not found: 'new'.
// testNewExtraArgs() => A<int, String>.new; // Error.
// ^^^
@@ -36,13 +24,9 @@
: super core::Object::•() {}
}
static method testFoo() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-testFoo() => A.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testFooArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:11:25: Error: Getter not found: 'foo'.
-testFooArgs() => A<int>.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testNew() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:12:16: Error: Getter not found: 'new'.
testNew() => A.new; // Ok.
@@ -52,9 +36,7 @@
testNewArgs() => A<int>.new; // Ok.
^^^";
static method testFooExtraArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:15:38: Error: Getter not found: 'foo'.
-testFooExtraArgs() => A<int, String>.foo; // Error.
- ^^^";
+ return self::A::foo;
static method testNewExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:16:38: Error: Getter not found: 'new'.
testNewExtraArgs() => A<int, String>.new; // Error.
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 bc6e6db..75dc4d2 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
@@ -2,14 +2,6 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-// testFoo() => A.foo; // Ok.
-// ^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:11:25: Error: Getter not found: 'foo'.
-// testFooArgs() => A<int>.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:12:16: Error: Getter not found: 'new'.
// testNew() => A.new; // Ok.
// ^^^
@@ -18,10 +10,6 @@
// testNewArgs() => A<int>.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:15:38: Error: Getter not found: 'foo'.
-// testFooExtraArgs() => A<int, String>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:16:38: Error: Getter not found: 'new'.
// testNewExtraArgs() => A<int, String>.new; // Error.
// ^^^
@@ -36,13 +24,9 @@
: super core::Object::•() {}
}
static method testFoo() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-testFoo() => A.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testFooArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:11:25: Error: Getter not found: 'foo'.
-testFooArgs() => A<int>.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testNew() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:12:16: Error: Getter not found: 'new'.
testNew() => A.new; // Ok.
@@ -52,9 +36,7 @@
testNewArgs() => A<int>.new; // Ok.
^^^";
static method testFooExtraArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:15:38: Error: Getter not found: 'foo'.
-testFooExtraArgs() => A<int, String>.foo; // Error.
- ^^^";
+ return self::A::foo;
static method testNewExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:16:38: Error: Getter not found: 'new'.
testNewExtraArgs() => A<int, String>.new; // Error.
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 bc6e6db..75dc4d2 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
@@ -2,14 +2,6 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-// testFoo() => A.foo; // Ok.
-// ^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:11:25: Error: Getter not found: 'foo'.
-// testFooArgs() => A<int>.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:12:16: Error: Getter not found: 'new'.
// testNew() => A.new; // Ok.
// ^^^
@@ -18,10 +10,6 @@
// testNewArgs() => A<int>.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:15:38: Error: Getter not found: 'foo'.
-// testFooExtraArgs() => A<int, String>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:16:38: Error: Getter not found: 'new'.
// testNewExtraArgs() => A<int, String>.new; // Error.
// ^^^
@@ -36,13 +24,9 @@
: super core::Object::•() {}
}
static method testFoo() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-testFoo() => A.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testFooArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:11:25: Error: Getter not found: 'foo'.
-testFooArgs() => A<int>.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testNew() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:12:16: Error: Getter not found: 'new'.
testNew() => A.new; // Ok.
@@ -52,9 +36,7 @@
testNewArgs() => A<int>.new; // Ok.
^^^";
static method testFooExtraArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:15:38: Error: Getter not found: 'foo'.
-testFooExtraArgs() => A<int, String>.foo; // Error.
- ^^^";
+ return self::A::foo;
static method testNewExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:16:38: Error: Getter not found: 'new'.
testNewExtraArgs() => A<int, String>.new; // Error.
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 bc6e6db..75dc4d2 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
@@ -2,14 +2,6 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-// testFoo() => A.foo; // Ok.
-// ^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:11:25: Error: Getter not found: 'foo'.
-// testFooArgs() => A<int>.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:12:16: Error: Getter not found: 'new'.
// testNew() => A.new; // Ok.
// ^^^
@@ -18,10 +10,6 @@
// testNewArgs() => A<int>.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:15:38: Error: Getter not found: 'foo'.
-// testFooExtraArgs() => A<int, String>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:16:38: Error: Getter not found: 'new'.
// testNewExtraArgs() => A<int, String>.new; // Error.
// ^^^
@@ -36,13 +24,9 @@
: super core::Object::•() {}
}
static method testFoo() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-testFoo() => A.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testFooArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:11:25: Error: Getter not found: 'foo'.
-testFooArgs() => A<int>.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testNew() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:12:16: Error: Getter not found: 'new'.
testNew() => A.new; // Ok.
@@ -52,9 +36,7 @@
testNewArgs() => A<int>.new; // Ok.
^^^";
static method testFooExtraArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:15:38: Error: Getter not found: 'foo'.
-testFooExtraArgs() => A<int, String>.foo; // Error.
- ^^^";
+ return self::A::foo;
static method testNewExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:16:38: Error: Getter not found: 'new'.
testNewExtraArgs() => A<int, String>.new; // Error.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.expect
index fac585b..99f37b0c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.expect
@@ -2,14 +2,6 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:10:35: Error: Getter not found: 'foo'.
-// A<num> Function(num) test1() => A.foo; // Ok.
-// ^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:11:35: Error: Getter not found: 'foo'.
-// A<int> Function(int) test2() => A.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:12:35: Error: Getter not found: 'new'.
// A<num> Function(num) test3() => A.new; // Ok.
// ^^^
@@ -18,18 +10,19 @@
// A<int> Function(int) test4() => A.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:15:42: Error: Getter not found: 'foo'.
+// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:15:40: Error: Inferred type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'A<X> Function<X extends num>(X)'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/instantiation.dart'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
// A<dynamic> Function(String) test5() => A.foo; // Error.
-// ^^^
+// ^
+// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:5:9: Context: This is the type variable whose bound isn't conformed to.
+// class A<X extends num> {
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:16:42: Error: Getter not found: 'new'.
// A<dynamic> Function(String) test6() => A.new; // Error.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:17:44: Error: Getter not found: 'foo'.
-// A<dynamic> Function(num) test7() => A<num>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:18:44: Error: Getter not found: 'new'.
// A<dynamic> Function(num) test8() => A<num>.new; // Error.
// ^^^
@@ -44,13 +37,9 @@
: super core::Object::•() {}
}
static method test1() → (core::num) → self::A<core::num>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:10:35: Error: Getter not found: 'foo'.
-A<num> Function(num) test1() => A.foo; // Ok.
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::num) → self::A<core::num>;
+ return self::A::foo<core::num>;
static method test2() → (core::int) → self::A<core::int>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:11:35: Error: Getter not found: 'foo'.
-A<int> Function(int) test2() => A.foo; // Ok.
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::int) → self::A<core::int>;
+ return self::A::foo<core::int>;
static method test3() → (core::num) → self::A<core::num>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:12:35: Error: Getter not found: 'new'.
A<num> Function(num) test3() => A.new; // Ok.
@@ -60,17 +49,13 @@
A<int> Function(int) test4() => A.new; // Ok.
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::int) → self::A<core::int>;
static method test5() → (core::String) → self::A<dynamic>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:15:42: Error: Getter not found: 'foo'.
-A<dynamic> Function(String) test5() => A.foo; // Error.
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::String) → self::A<dynamic>;
+ return self::A::foo<core::String>;
static method test6() → (core::String) → self::A<dynamic>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:16:42: Error: Getter not found: 'new'.
A<dynamic> Function(String) test6() => A.new; // Error.
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::String) → self::A<dynamic>;
static method test7() → (core::num) → self::A<dynamic>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:17:44: Error: Getter not found: 'foo'.
-A<dynamic> Function(num) test7() => A<num>.foo; // Error.
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::num) → self::A<dynamic>;
+ return self::A::foo<core::num>;
static method test8() → (core::num) → self::A<dynamic>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:18:44: Error: Getter not found: 'new'.
A<dynamic> Function(num) test8() => A<num>.new; // Error.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.expect
index fac585b..99f37b0c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.expect
@@ -2,14 +2,6 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:10:35: Error: Getter not found: 'foo'.
-// A<num> Function(num) test1() => A.foo; // Ok.
-// ^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:11:35: Error: Getter not found: 'foo'.
-// A<int> Function(int) test2() => A.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:12:35: Error: Getter not found: 'new'.
// A<num> Function(num) test3() => A.new; // Ok.
// ^^^
@@ -18,18 +10,19 @@
// A<int> Function(int) test4() => A.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:15:42: Error: Getter not found: 'foo'.
+// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:15:40: Error: Inferred type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'A<X> Function<X extends num>(X)'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/instantiation.dart'.
+// Try specifying type arguments explicitly so that they conform to the bounds.
// A<dynamic> Function(String) test5() => A.foo; // Error.
-// ^^^
+// ^
+// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:5:9: Context: This is the type variable whose bound isn't conformed to.
+// class A<X extends num> {
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:16:42: Error: Getter not found: 'new'.
// A<dynamic> Function(String) test6() => A.new; // Error.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:17:44: Error: Getter not found: 'foo'.
-// A<dynamic> Function(num) test7() => A<num>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:18:44: Error: Getter not found: 'new'.
// A<dynamic> Function(num) test8() => A<num>.new; // Error.
// ^^^
@@ -44,13 +37,9 @@
: super core::Object::•() {}
}
static method test1() → (core::num) → self::A<core::num>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:10:35: Error: Getter not found: 'foo'.
-A<num> Function(num) test1() => A.foo; // Ok.
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::num) → self::A<core::num>;
+ return self::A::foo<core::num>;
static method test2() → (core::int) → self::A<core::int>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:11:35: Error: Getter not found: 'foo'.
-A<int> Function(int) test2() => A.foo; // Ok.
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::int) → self::A<core::int>;
+ return self::A::foo<core::int>;
static method test3() → (core::num) → self::A<core::num>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:12:35: Error: Getter not found: 'new'.
A<num> Function(num) test3() => A.new; // Ok.
@@ -60,17 +49,13 @@
A<int> Function(int) test4() => A.new; // Ok.
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::int) → self::A<core::int>;
static method test5() → (core::String) → self::A<dynamic>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:15:42: Error: Getter not found: 'foo'.
-A<dynamic> Function(String) test5() => A.foo; // Error.
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::String) → self::A<dynamic>;
+ return self::A::foo<core::String>;
static method test6() → (core::String) → self::A<dynamic>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:16:42: Error: Getter not found: 'new'.
A<dynamic> Function(String) test6() => A.new; // Error.
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::String) → self::A<dynamic>;
static method test7() → (core::num) → self::A<dynamic>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:17:44: Error: Getter not found: 'foo'.
-A<dynamic> Function(num) test7() => A<num>.foo; // Error.
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::num) → self::A<dynamic>;
+ return self::A::foo<core::num>;
static method test8() → (core::num) → self::A<dynamic>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:18:44: Error: Getter not found: 'new'.
A<dynamic> Function(num) test8() => A<num>.new; // Error.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect
index 905eda3..66b9517 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect
@@ -2,13 +2,10 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:11:27: Error: Getter not found: 'foo1'.
-// A Function() test1() => A.foo1; // Ok.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:27: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
// A Function() test2() => A.foo2; // Error.
-// ^^^^
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
// A Function() test3() => A.new; // Ok.
@@ -30,13 +27,12 @@
: super core::Object::•() {}
}
static method test1() → () → self::A
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:11:27: Error: Getter not found: 'foo1'.
-A Function() test1() => A.foo1; // Ok.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} () → self::A;
+ return self::A::foo1;
static method test2() → () → self::A
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:27: Error: Getter not found: 'foo2'.
+ return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function() test2() => A.foo2; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} () → self::A;
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} () → self::A;
static method test3() → () → self::A
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
A Function() test3() => A.new; // Ok.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect
index 26fd1c7..3a31a79 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect
@@ -2,13 +2,10 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:11:27: Error: Getter not found: 'foo1'.
-// A Function() test1() => A.foo1; // Ok.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:27: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
// A Function() test2() => A.foo2; // Error.
-// ^^^^
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
// A Function() test3() => A.new; // Ok.
@@ -30,13 +27,12 @@
: super core::Object::•() {}
}
static method test1() → () → self::A
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:11:27: Error: Getter not found: 'foo1'.
-A Function() test1() => A.foo1; // Ok.
- ^^^^";
+ return self::A::foo1;
static method test2() → () → self::A
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:27: Error: Getter not found: 'foo2'.
+ return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function() test2() => A.foo2; // Error.
- ^^^^";
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} () → self::A;
static method test3() → () → self::A
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
A Function() test3() => A.new; // Ok.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect
index 905eda3..66b9517 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect
@@ -2,13 +2,10 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:11:27: Error: Getter not found: 'foo1'.
-// A Function() test1() => A.foo1; // Ok.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:27: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
// A Function() test2() => A.foo2; // Error.
-// ^^^^
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
// A Function() test3() => A.new; // Ok.
@@ -30,13 +27,12 @@
: super core::Object::•() {}
}
static method test1() → () → self::A
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:11:27: Error: Getter not found: 'foo1'.
-A Function() test1() => A.foo1; // Ok.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} () → self::A;
+ return self::A::foo1;
static method test2() → () → self::A
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:27: Error: Getter not found: 'foo2'.
+ return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function() test2() => A.foo2; // Error.
- ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} () → self::A;
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} () → self::A;
static method test3() → () → self::A
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
A Function() test3() => A.new; // Ok.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect
index 26fd1c7..3a31a79 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect
@@ -2,13 +2,10 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:11:27: Error: Getter not found: 'foo1'.
-// A Function() test1() => A.foo1; // Ok.
-// ^^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:27: Error: Getter not found: 'foo2'.
+// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
+// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
// A Function() test2() => A.foo2; // Error.
-// ^^^^
+// ^
//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
// A Function() test3() => A.new; // Ok.
@@ -30,13 +27,12 @@
: super core::Object::•() {}
}
static method test1() → () → self::A
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:11:27: Error: Getter not found: 'foo1'.
-A Function() test1() => A.foo1; // Ok.
- ^^^^";
+ return self::A::foo1;
static method test2() → () → self::A
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:27: Error: Getter not found: 'foo2'.
+ return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:12:25: Error: A value of type 'A Function(int)' can't be returned from a function with return type 'A Function()'.
+ - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function() test2() => A.foo2; // Error.
- ^^^^";
+ ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} () → self::A;
static method test3() → () → self::A
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13:27: Error: Getter not found: 'new'.
A Function() test3() => A.new; // Ok.
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 a888351..58372ea 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
@@ -2,18 +2,10 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-// testFoo() => A.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:11:16: Error: Getter not found: 'new'.
// testNew() => A.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:13:30: Error: Getter not found: 'foo'.
-// testFooExtraArgs() => A<int>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:14:30: Error: Getter not found: 'new'.
// testNewExtraArgs() => A<int>.new; // Error.
// ^^^
@@ -28,17 +20,13 @@
: super core::Object::•() {}
}
static method testFoo() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-testFoo() => A.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testNew() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:11:16: Error: Getter not found: 'new'.
testNew() => A.new; // Ok.
^^^";
static method testFooExtraArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:13:30: Error: Getter not found: 'foo'.
-testFooExtraArgs() => A<int>.foo; // Error.
- ^^^";
+ return self::A::foo;
static method testNewExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:14:30: Error: Getter not found: 'new'.
testNewExtraArgs() => A<int>.new; // Error.
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 a888351..58372ea 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
@@ -2,18 +2,10 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-// testFoo() => A.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:11:16: Error: Getter not found: 'new'.
// testNew() => A.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:13:30: Error: Getter not found: 'foo'.
-// testFooExtraArgs() => A<int>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:14:30: Error: Getter not found: 'new'.
// testNewExtraArgs() => A<int>.new; // Error.
// ^^^
@@ -28,17 +20,13 @@
: super core::Object::•() {}
}
static method testFoo() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-testFoo() => A.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testNew() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:11:16: Error: Getter not found: 'new'.
testNew() => A.new; // Ok.
^^^";
static method testFooExtraArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:13:30: Error: Getter not found: 'foo'.
-testFooExtraArgs() => A<int>.foo; // Error.
- ^^^";
+ return self::A::foo;
static method testNewExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:14:30: Error: Getter not found: 'new'.
testNewExtraArgs() => A<int>.new; // Error.
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 a888351..58372ea 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
@@ -2,18 +2,10 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-// testFoo() => A.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:11:16: Error: Getter not found: 'new'.
// testNew() => A.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:13:30: Error: Getter not found: 'foo'.
-// testFooExtraArgs() => A<int>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:14:30: Error: Getter not found: 'new'.
// testNewExtraArgs() => A<int>.new; // Error.
// ^^^
@@ -28,17 +20,13 @@
: super core::Object::•() {}
}
static method testFoo() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-testFoo() => A.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testNew() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:11:16: Error: Getter not found: 'new'.
testNew() => A.new; // Ok.
^^^";
static method testFooExtraArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:13:30: Error: Getter not found: 'foo'.
-testFooExtraArgs() => A<int>.foo; // Error.
- ^^^";
+ return self::A::foo;
static method testNewExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:14:30: Error: Getter not found: 'new'.
testNewExtraArgs() => A<int>.new; // Error.
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 a888351..58372ea 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
@@ -2,18 +2,10 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-// testFoo() => A.foo; // Ok.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:11:16: Error: Getter not found: 'new'.
// testNew() => A.new; // Ok.
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:13:30: Error: Getter not found: 'foo'.
-// testFooExtraArgs() => A<int>.foo; // Error.
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:14:30: Error: Getter not found: 'new'.
// testNewExtraArgs() => A<int>.new; // Error.
// ^^^
@@ -28,17 +20,13 @@
: super core::Object::•() {}
}
static method testFoo() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:10:16: Error: Getter not found: 'foo'.
-testFoo() => A.foo; // Ok.
- ^^^";
+ return self::A::foo;
static method testNew() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:11:16: Error: Getter not found: 'new'.
testNew() => A.new; // Ok.
^^^";
static method testFooExtraArgs() → dynamic
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:13:30: Error: Getter not found: 'foo'.
-testFooExtraArgs() => A<int>.foo; // Error.
- ^^^";
+ return self::A::foo;
static method testNewExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:14:30: Error: Getter not found: 'new'.
testNewExtraArgs() => A<int>.new; // Error.
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.expect
index c5f6007..0a35e7f 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.expect
@@ -68,10 +68,6 @@
// var f1 = A.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:28:14: Error: Getter not found: 'new'.
-// var f1 = A.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:29:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// var f2 = B.new;
@@ -86,10 +82,6 @@
// var f3 = C.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:30:14: Error: Getter not found: 'new'.
-// var f3 = C.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:31:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// var f4 = D.new;
@@ -104,10 +96,6 @@
// A Function() g1 = A.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:37:23: Error: Getter not found: 'new'.
-// A Function() g1 = A.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:38:23: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// B Function() g2 = B.new;
@@ -122,10 +110,6 @@
// C Function(int x) g3 = C.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:39:28: Error: Getter not found: 'new'.
-// C Function(int x) g3 = C.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:40:28: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// D Function(int x) g4 = D.new;
@@ -179,31 +163,23 @@
^^^";
#C2;
new self::C::new(1);
- dynamic f1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:28:14: Error: Getter not found: 'new'.
- var f1 = A.new;
- ^^^";
+ () → self::A f1 = self::A::new;
dynamic f2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:29:14: Error: Getter not found: 'new'.
var f2 = B.new;
^^^";
- dynamic f3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:30:14: Error: Getter not found: 'new'.
- var f3 = C.new;
- ^^^";
+ (core::int) → self::C f3 = self::C::new;
dynamic f4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:31:14: Error: Getter not found: 'new'.
var f4 = D.new;
^^^";
- f1{dynamic}.call();
+ f1(){() → self::A};
f2{dynamic}.call();
- f3{dynamic}.call(1);
+ f3(1){(core::int) → self::C};
f4{dynamic}.call(1);
- () → self::A g1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:37:23: Error: Getter not found: 'new'.
- A Function() g1 = A.new;
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} () → self::A;
+ () → self::A g1 = self::A::new;
() → self::B g2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:38:23: Error: Getter not found: 'new'.
B Function() g2 = B.new;
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} () → self::B;
- (core::int) → self::C g3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:39:28: Error: Getter not found: 'new'.
- C Function(int x) g3 = C.new;
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::int) → self::C;
+ (core::int) → self::C g3 = self::C::new;
(core::int) → self::D g4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:40:28: Error: Getter not found: 'new'.
D Function(int x) g4 = D.new;
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::int) → self::D;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.transformed.expect
index 7323740..77763cb 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.transformed.expect
@@ -68,10 +68,6 @@
// var f1 = A.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:28:14: Error: Getter not found: 'new'.
-// var f1 = A.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:29:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// var f2 = B.new;
@@ -86,10 +82,6 @@
// var f3 = C.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:30:14: Error: Getter not found: 'new'.
-// var f3 = C.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:31:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// var f4 = D.new;
@@ -104,10 +96,6 @@
// A Function() g1 = A.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:37:23: Error: Getter not found: 'new'.
-// A Function() g1 = A.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:38:23: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// B Function() g2 = B.new;
@@ -122,10 +110,6 @@
// C Function(int x) g3 = C.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:39:28: Error: Getter not found: 'new'.
-// C Function(int x) g3 = C.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:40:28: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// D Function(int x) g4 = D.new;
@@ -179,31 +163,23 @@
^^^";
#C2;
new self::C::new(1);
- dynamic f1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:28:14: Error: Getter not found: 'new'.
- var f1 = A.new;
- ^^^";
+ () → self::A f1 = self::A::new;
dynamic f2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:29:14: Error: Getter not found: 'new'.
var f2 = B.new;
^^^";
- dynamic f3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:30:14: Error: Getter not found: 'new'.
- var f3 = C.new;
- ^^^";
+ (core::int) → self::C f3 = self::C::new;
dynamic f4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:31:14: Error: Getter not found: 'new'.
var f4 = D.new;
^^^";
- f1{dynamic}.call();
+ f1(){() → self::A};
f2{dynamic}.call();
- f3{dynamic}.call(1);
+ f3(1){(core::int) → self::C};
f4{dynamic}.call(1);
- () → self::A g1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:37:23: Error: Getter not found: 'new'.
- A Function() g1 = A.new;
- ^^^";
+ () → self::A g1 = self::A::new;
() → self::B g2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:38:23: Error: Getter not found: 'new'.
B Function() g2 = B.new;
^^^";
- (core::int) → self::C g3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:39:28: Error: Getter not found: 'new'.
- C Function(int x) g3 = C.new;
- ^^^";
+ (core::int) → self::C g3 = self::C::new;
(core::int) → self::D g4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:40:28: Error: Getter not found: 'new'.
D Function(int x) g4 = D.new;
^^^";
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.expect
index c5f6007..0a35e7f 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.expect
@@ -68,10 +68,6 @@
// var f1 = A.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:28:14: Error: Getter not found: 'new'.
-// var f1 = A.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:29:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// var f2 = B.new;
@@ -86,10 +82,6 @@
// var f3 = C.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:30:14: Error: Getter not found: 'new'.
-// var f3 = C.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:31:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// var f4 = D.new;
@@ -104,10 +96,6 @@
// A Function() g1 = A.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:37:23: Error: Getter not found: 'new'.
-// A Function() g1 = A.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:38:23: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// B Function() g2 = B.new;
@@ -122,10 +110,6 @@
// C Function(int x) g3 = C.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:39:28: Error: Getter not found: 'new'.
-// C Function(int x) g3 = C.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:40:28: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// D Function(int x) g4 = D.new;
@@ -179,31 +163,23 @@
^^^";
#C2;
new self::C::new(1);
- dynamic f1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:28:14: Error: Getter not found: 'new'.
- var f1 = A.new;
- ^^^";
+ () → self::A f1 = self::A::new;
dynamic f2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:29:14: Error: Getter not found: 'new'.
var f2 = B.new;
^^^";
- dynamic f3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:30:14: Error: Getter not found: 'new'.
- var f3 = C.new;
- ^^^";
+ (core::int) → self::C f3 = self::C::new;
dynamic f4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:31:14: Error: Getter not found: 'new'.
var f4 = D.new;
^^^";
- f1{dynamic}.call();
+ f1(){() → self::A};
f2{dynamic}.call();
- f3{dynamic}.call(1);
+ f3(1){(core::int) → self::C};
f4{dynamic}.call(1);
- () → self::A g1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:37:23: Error: Getter not found: 'new'.
- A Function() g1 = A.new;
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} () → self::A;
+ () → self::A g1 = self::A::new;
() → self::B g2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:38:23: Error: Getter not found: 'new'.
B Function() g2 = B.new;
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} () → self::B;
- (core::int) → self::C g3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:39:28: Error: Getter not found: 'new'.
- C Function(int x) g3 = C.new;
- ^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::int) → self::C;
+ (core::int) → self::C g3 = self::C::new;
(core::int) → self::D g4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:40:28: Error: Getter not found: 'new'.
D Function(int x) g4 = D.new;
^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} (core::int) → self::D;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.transformed.expect
index 7323740..77763cb 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.transformed.expect
@@ -68,10 +68,6 @@
// var f1 = A.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:28:14: Error: Getter not found: 'new'.
-// var f1 = A.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:29:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// var f2 = B.new;
@@ -86,10 +82,6 @@
// var f3 = C.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:30:14: Error: Getter not found: 'new'.
-// var f3 = C.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:31:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// var f4 = D.new;
@@ -104,10 +96,6 @@
// A Function() g1 = A.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:37:23: Error: Getter not found: 'new'.
-// A Function() g1 = A.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:38:23: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// B Function() g2 = B.new;
@@ -122,10 +110,6 @@
// C Function(int x) g3 = C.new;
// ^^^
//
-// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:39:28: Error: Getter not found: 'new'.
-// C Function(int x) g3 = C.new;
-// ^^^
-//
// pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:40:28: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'.
// D Function(int x) g4 = D.new;
@@ -179,31 +163,23 @@
^^^";
#C2;
new self::C::new(1);
- dynamic f1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:28:14: Error: Getter not found: 'new'.
- var f1 = A.new;
- ^^^";
+ () → self::A f1 = self::A::new;
dynamic f2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:29:14: Error: Getter not found: 'new'.
var f2 = B.new;
^^^";
- dynamic f3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:30:14: Error: Getter not found: 'new'.
- var f3 = C.new;
- ^^^";
+ (core::int) → self::C f3 = self::C::new;
dynamic f4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:31:14: Error: Getter not found: 'new'.
var f4 = D.new;
^^^";
- f1{dynamic}.call();
+ f1(){() → self::A};
f2{dynamic}.call();
- f3{dynamic}.call(1);
+ f3(1){(core::int) → self::C};
f4{dynamic}.call(1);
- () → self::A g1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:37:23: Error: Getter not found: 'new'.
- A Function() g1 = A.new;
- ^^^";
+ () → self::A g1 = self::A::new;
() → self::B g2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:38:23: Error: Getter not found: 'new'.
B Function() g2 = B.new;
^^^";
- (core::int) → self::C g3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:39:28: Error: Getter not found: 'new'.
- C Function(int x) g3 = C.new;
- ^^^";
+ (core::int) → self::C g3 = self::C::new;
(core::int) → self::D g4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart:40:28: Error: Getter not found: 'new'.
D Function(int x) g4 = D.new;
^^^";
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index cfb0715..6b4d01c 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -8,6 +8,7 @@
dart2js/late_statics: SemiFuzzFailure # dartbug.com/45854
+constructor_tearoffs/instantiation: TypeCheckError
constructor_tearoffs/redirecting_constructors: RuntimeError
extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
extension_types/issue45775: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index c7df9c9..322bacf 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -6,7 +6,13 @@
# the round trip for Kernel textual serialization where the initial binary
# Kernel files are produced by compiling Dart code via Fasta.
+constructor_tearoffs/generic_tearoff_with_context: TextSerializationFailure
+constructor_tearoffs/generic_tearoff_without_context: TextSerializationFailure
+constructor_tearoffs/instantiation: TypeCheckError
+constructor_tearoffs/nongeneric_tearoff_with_context: TextSerializationFailure
+constructor_tearoffs/nongeneric_tearoff_without_context: TextSerializationFailure
constructor_tearoffs/redirecting_constructors: RuntimeError
+constructor_tearoffs/unnamed_constructor: TextSerializationFailure
extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
extension_types/issue45775: ExpectationFileMismatchSerialized # Expected.
extension_types/simple: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index 82c2ba6..d2ea6a0 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -11,6 +11,7 @@
regress/utf_16_le_content.crash: SemiFuzzCrash
dart2js/late_statics: SemiFuzzFailure # dartbug.com/45854
+constructor_tearoffs/instantiation: TypeCheckError
constructor_tearoffs/redirecting_constructors: RuntimeError
extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
extension_types/issue45775: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index b9ab3da..197bdfa 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -2051,6 +2051,10 @@
writeExpression(node.value);
}
+ visitConstructorTearOff(ConstructorTearOff node) {
+ writeMemberReferenceFromReference(node.constructorReference);
+ }
+
visitExpressionStatement(ExpressionStatement node) {
writeIndentation();
writeExpression(node.expression);
diff --git a/tools/VERSION b/tools/VERSION
index d92be24..5a8f96e 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 282
+PRERELEASE 283
PRERELEASE_PATCH 0
\ No newline at end of file