mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
[cfe] Add generation of ConstructorTearOff nodes
Change-Id: Ice66a1cdde0e4858528ec0bbc0a85054b08228c5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206040 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
parent
56df34c8a0
commit
5a9ffe55a8
31 changed files with 274 additions and 490 deletions
|
@ -452,6 +452,11 @@ class BodyBuilder extends ScopeListener<JumpTarget>
|
|||
return libraryBuilder.enableConstFunctionsInLibrary;
|
||||
}
|
||||
|
||||
@override
|
||||
bool get enableConstructorTearOffsInLibrary {
|
||||
return libraryBuilder.enableConstructorTearOffsInLibrary;
|
||||
}
|
||||
|
||||
void _enterLocalState({bool inLateLocalInitializer: false}) {
|
||||
_localInitializerState =
|
||||
_localInitializerState.prepend(inLateLocalInitializer);
|
||||
|
|
|
@ -15,6 +15,8 @@ import 'package:_fe_analyzer_shared/src/scanner/token.dart' show Token;
|
|||
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 @@ class TypeUseGenerator extends ReadOnlyAccessGenerator {
|
|||
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,
|
||||
|
|
|
@ -66,6 +66,8 @@ abstract class ExpressionGeneratorHelper implements InferenceHelper {
|
|||
|
||||
bool get enableConstFunctionsInLibrary;
|
||||
|
||||
bool get enableConstructorTearOffsInLibrary;
|
||||
|
||||
scopeLookup(Scope scope, String name, Token token,
|
||||
{bool isQualified: false, PrefixBuilder prefix});
|
||||
|
||||
|
|
|
@ -752,6 +752,12 @@ class Forest {
|
|||
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 {
|
||||
|
|
|
@ -217,7 +217,9 @@ class InferenceVisitor
|
|||
@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
|
||||
|
|
|
@ -2,13 +2,12 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::Object? = dynamic> extends core::Object {
|
|||
;
|
||||
}
|
||||
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 @@ static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%
|
|||
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 {}
|
||||
|
|
|
@ -2,13 +2,12 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::Object? = dynamic> extends core::Object {
|
|||
;
|
||||
}
|
||||
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 @@ static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%
|
|||
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 {}
|
||||
|
|
|
@ -2,13 +2,12 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::Object? = dynamic> extends core::Object {
|
|||
;
|
||||
}
|
||||
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 @@ static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%
|
|||
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 {}
|
||||
|
|
|
@ -2,13 +2,12 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::Object? = dynamic> extends core::Object {
|
|||
;
|
||||
}
|
||||
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 @@ static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%
|
|||
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 {}
|
||||
|
|
|
@ -2,14 +2,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::Object? = dynamic> extends core::Object {
|
|||
: 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 @@ static method testNewArgs() → dynamic
|
|||
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.
|
||||
|
|
|
@ -2,14 +2,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::Object? = dynamic> extends core::Object {
|
|||
: 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 @@ static method testNewArgs() → dynamic
|
|||
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.
|
||||
|
|
|
@ -2,14 +2,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::Object? = dynamic> extends core::Object {
|
|||
: 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 @@ static method testNewArgs() → dynamic
|
|||
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.
|
||||
|
|
|
@ -2,14 +2,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::Object? = dynamic> extends core::Object {
|
|||
: 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 @@ static method testNewArgs() → dynamic
|
|||
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.
|
||||
|
|
|
@ -2,14 +2,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::num> extends core::Object {
|
|||
: 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 @@ static method test4() → (core::int) → self::A<core::int>
|
|||
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.
|
||||
|
|
|
@ -2,14 +2,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ class A<X extends core::num> extends core::Object {
|
|||
: 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 @@ static method test4() → (core::int) → self::A<core::int>
|
|||
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.
|
||||
|
|
|
@ -2,13 +2,10 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ class A extends core::Object {
|
|||
: 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.
|
||||
|
|
|
@ -2,13 +2,10 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ class A extends core::Object {
|
|||
: 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.
|
||||
|
|
|
@ -2,13 +2,10 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ class A extends core::Object {
|
|||
: 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.
|
||||
|
|
|
@ -2,13 +2,10 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ class A extends core::Object {
|
|||
: 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.
|
||||
|
|
|
@ -2,18 +2,10 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ class A extends core::Object {
|
|||
: 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.
|
||||
|
|
|
@ -2,18 +2,10 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ class A extends core::Object {
|
|||
: 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.
|
||||
|
|
|
@ -2,18 +2,10 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ class A extends core::Object {
|
|||
: 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.
|
||||
|
|
|
@ -2,18 +2,10 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// 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 @@ class A extends core::Object {
|
|||
: 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.
|
||||
|
|
|
@ -68,10 +68,6 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ static method test() → dynamic {
|
|||
^^^";
|
||||
#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;
|
||||
|
|
|
@ -68,10 +68,6 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ static method test() → dynamic {
|
|||
^^^";
|
||||
#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;
|
||||
^^^";
|
||||
|
|
|
@ -68,10 +68,6 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ static method test() → dynamic {
|
|||
^^^";
|
||||
#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;
|
||||
|
|
|
@ -68,10 +68,6 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ library /*isNonNullableByDefault*/;
|
|||
// 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 @@ static method test() → dynamic {
|
|||
^^^";
|
||||
#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;
|
||||
^^^";
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -11,6 +11,7 @@ general/error_recovery/issue_39058.crash: SemiFuzzFailure
|
|||
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.
|
||||
|
|
|
@ -2051,6 +2051,10 @@ class Printer extends Visitor<void> with VisitorVoidMixin {
|
|||
writeExpression(node.value);
|
||||
}
|
||||
|
||||
visitConstructorTearOff(ConstructorTearOff node) {
|
||||
writeMemberReferenceFromReference(node.constructorReference);
|
||||
}
|
||||
|
||||
visitExpressionStatement(ExpressionStatement node) {
|
||||
writeIndentation();
|
||||
writeExpression(node.expression);
|
||||
|
|
Loading…
Reference in a new issue