Version 2.14.0-338.0.dev
Merge commit '2f0b352e9846adc20870f7a4eff59d8ae2adf7da' into 'dev'
diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json
index ded9980..546ad7a 100644
--- a/.dart_tool/package_config.json
+++ b/.dart_tool/package_config.json
@@ -11,7 +11,7 @@
"constraint, update this by running tools/generate_package_config.dart."
],
"configVersion": 2,
- "generated": "2021-07-19T10:44:52.605499",
+ "generated": "2021-07-20T10:43:52.568177",
"generator": "tools/generate_package_config.dart",
"packages": [
{
@@ -64,7 +64,7 @@
"name": "_js_interop_checks",
"rootUri": "../pkg/_js_interop_checks",
"packageUri": "lib/",
- "languageVersion": "2.7"
+ "languageVersion": "2.12"
},
{
"name": "analysis_server",
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index 289ec96..69bbfeb 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -3992,6 +3992,16 @@
message: r"""FFI leaf call must not have Handle argument types.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeFfiNativeAnnotationMustAnnotateStatic =
+ messageFfiNativeAnnotationMustAnnotateStatic;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageFfiNativeAnnotationMustAnnotateStatic =
+ const MessageCode("FfiNativeAnnotationMustAnnotateStatic",
+ message:
+ r"""FfiNative annotations can only be used on static functions.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
Message Function(String name)> templateFfiNotStatic = const Template<
Message Function(String name)>(
diff --git a/pkg/_js_interop_checks/lib/js_interop_checks.dart b/pkg/_js_interop_checks/lib/js_interop_checks.dart
index 4f3ba97..e4d4691 100644
--- a/pkg/_js_interop_checks/lib/js_interop_checks.dart
+++ b/pkg/_js_interop_checks/lib/js_interop_checks.dart
@@ -105,14 +105,14 @@
cls.name, superclass.name),
cls.fileOffset,
cls.name.length,
- cls.location.file);
+ cls.fileUri);
} else if (!_classHasJSAnnotation && superHasJSAnnotation) {
_diagnosticsReporter.report(
templateJsInteropDartClassExtendsJSClass.withArguments(
cls.name, superclass.name),
cls.fileOffset,
cls.name.length,
- cls.location.file);
+ cls.fileUri);
}
}
// Since this is a breaking check, it is language-versioned.
@@ -129,10 +129,10 @@
// a value for `className` that doesn't start with 'self.' or 'window.'.
var classRegexp = new RegExp(r'^((self|window)\.)*(?<className>.*)$');
var matches = classRegexp.allMatches(jsClass);
- jsClass = matches.first.namedGroup('className');
+ jsClass = matches.first.namedGroup('className')!;
}
- if (_nativeClasses.containsKey(jsClass)) {
- var nativeClass = _nativeClasses[jsClass];
+ var nativeClass = _nativeClasses[jsClass];
+ if (nativeClass != null) {
_diagnosticsReporter.report(
templateJsInteropNativeClassInAnnotation.withArguments(
cls.name,
@@ -140,7 +140,7 @@
nativeClass.enclosingLibrary.importUri.toString()),
cls.fileOffset,
cls.name.length,
- cls.location.file);
+ cls.fileUri);
}
}
super.visitClass(cls);
@@ -180,32 +180,30 @@
messageJsInteropNonExternalMember,
procedure.fileOffset,
procedure.name.text.length,
- procedure.location.file);
+ procedure.fileUri);
}
}
if (!_isJSInteropMember(procedure)) return;
if (!procedure.isStatic &&
(procedure.name.text == '[]=' || procedure.name.text == '[]')) {
- _diagnosticsReporter.report(
- messageJsInteropIndexNotSupported,
- procedure.fileOffset,
- procedure.name.text.length,
- procedure.location.file);
+ _diagnosticsReporter.report(messageJsInteropIndexNotSupported,
+ procedure.fileOffset, procedure.name.text.length, procedure.fileUri);
}
var isAnonymousFactory =
_classHasAnonymousAnnotation && procedure.isFactory;
if (isAnonymousFactory) {
+ // ignore: unnecessary_null_comparison
if (procedure.function != null &&
!procedure.function.positionalParameters.isEmpty) {
var firstPositionalParam = procedure.function.positionalParameters[0];
_diagnosticsReporter.report(
messageJsInteropAnonymousFactoryPositionalParameters,
firstPositionalParam.fileOffset,
- firstPositionalParam.name.length,
- firstPositionalParam.location.file);
+ firstPositionalParam.name!.length,
+ firstPositionalParam.location!.file);
}
} else {
// Only factory constructors for anonymous classes are allowed to have
@@ -225,7 +223,7 @@
messageJsInteropNonExternalConstructor,
constructor.fileOffset,
constructor.name.text.length,
- constructor.location.file);
+ constructor.fileUri);
}
if (!_isJSInteropMember(constructor)) return;
@@ -234,13 +232,14 @@
/// Reports an error if [functionNode] has named parameters.
void _checkNoNamedParameters(FunctionNode functionNode) {
+ // ignore: unnecessary_null_comparison
if (functionNode != null && !functionNode.namedParameters.isEmpty) {
var firstNamedParam = functionNode.namedParameters[0];
_diagnosticsReporter.report(
messageJsInteropNamedParameters,
firstNamedParam.fileOffset,
- firstNamedParam.name.length,
- firstNamedParam.location.file);
+ firstNamedParam.name!.length,
+ firstNamedParam.location!.file);
}
}
@@ -255,10 +254,10 @@
// If in a class that is not JS interop, this member is not allowed to be
// JS interop.
_diagnosticsReporter.report(messageJsInteropEnclosingClassJSAnnotation,
- member.fileOffset, member.name.text.length, member.location.file,
+ member.fileOffset, member.name.text.length, member.fileUri,
context: <LocatedMessage>[
messageJsInteropEnclosingClassJSAnnotationContext.withLocation(
- enclosingClass.location.file,
+ enclosingClass.fileUri,
enclosingClass.fileOffset,
enclosingClass.name.length)
]);
@@ -274,7 +273,7 @@
messageJsInteropExternalMemberNotJSAnnotated,
member.fileOffset,
member.name.text.length,
- member.location.file);
+ member.fileUri);
}
}
}
diff --git a/pkg/_js_interop_checks/lib/src/js_interop.dart b/pkg/_js_interop_checks/lib/src/js_interop.dart
index 7831f2d..60a8dfd 100644
--- a/pkg/_js_interop_checks/lib/src/js_interop.dart
+++ b/pkg/_js_interop_checks/lib/src/js_interop.dart
@@ -89,7 +89,7 @@
///
/// This function works regardless of whether the CFE is evaluating constants,
/// or whether the constant is a field reference (such as "anonymous" above).
-Class _annotationClass(Expression node) {
+Class? _annotationClass(Expression node) {
if (node is ConstantExpression) {
var constant = node.constant;
if (constant is InstanceConstant) return constant.classNode;
diff --git a/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart b/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
index b29d418..4159999 100644
--- a/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
+++ b/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
@@ -36,26 +36,26 @@
JsUtilOptimizer(this._coreTypes, ClassHierarchy hierarchy)
: _jsTarget =
- _coreTypes.index.getTopLevelMember('dart:_foreign_helper', 'JS'),
+ _coreTypes.index.getTopLevelProcedure('dart:_foreign_helper', 'JS'),
_callMethodTarget =
- _coreTypes.index.getTopLevelMember('dart:js_util', 'callMethod'),
+ _coreTypes.index.getTopLevelProcedure('dart:js_util', 'callMethod'),
_callMethodUncheckedTargets = List<Procedure>.generate(
5,
- (i) => _coreTypes.index
- .getTopLevelMember('dart:js_util', '_callMethodUnchecked$i')),
- _getPropertyTarget =
- _coreTypes.index.getTopLevelMember('dart:js_util', 'getProperty'),
- _setPropertyTarget =
- _coreTypes.index.getTopLevelMember('dart:js_util', 'setProperty'),
+ (i) => _coreTypes.index.getTopLevelProcedure(
+ 'dart:js_util', '_callMethodUnchecked$i')),
+ _getPropertyTarget = _coreTypes.index
+ .getTopLevelProcedure('dart:js_util', 'getProperty'),
+ _setPropertyTarget = _coreTypes.index
+ .getTopLevelProcedure('dart:js_util', 'setProperty'),
_setPropertyUncheckedTarget = _coreTypes.index
- .getTopLevelMember('dart:js_util', '_setPropertyUnchecked'),
+ .getTopLevelProcedure('dart:js_util', '_setPropertyUnchecked'),
_allowInteropTarget =
- _coreTypes.index.getTopLevelMember('dart:js', 'allowInterop'),
+ _coreTypes.index.getTopLevelProcedure('dart:js', 'allowInterop'),
_allowedInteropJsUtilTargets = _allowedInteropJsUtilMembers.map(
(member) =>
- _coreTypes.index.getTopLevelMember('dart:js_util', member)),
+ _coreTypes.index.getTopLevelProcedure('dart:js_util', member)),
_listEmptyFactory =
- _coreTypes.index.getMember('dart:core', 'List', 'empty'),
+ _coreTypes.index.getProcedure('dart:core', 'List', 'empty'),
_staticTypeContext = StatefulStaticTypeContext.stacked(
TypeEnvironment(_coreTypes, hierarchy)) {}
diff --git a/pkg/_js_interop_checks/pubspec.yaml b/pkg/_js_interop_checks/pubspec.yaml
index 1463e1d..bae1992 100644
--- a/pkg/_js_interop_checks/pubspec.yaml
+++ b/pkg/_js_interop_checks/pubspec.yaml
@@ -3,7 +3,7 @@
publish_to: none
environment:
- sdk: '>=2.7.0 <3.0.0'
+ sdk: '>=2.12.0 <3.0.0'
dependencies:
_fe_analyzer_shared:
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index d9cf181..0a2b2c8 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -471,6 +471,7 @@
FfiCode.EMPTY_STRUCT,
FfiCode.EXTRA_ANNOTATION_ON_STRUCT_FIELD,
FfiCode.EXTRA_SIZE_ANNOTATION_CARRAY,
+ FfiCode.FFI_NATIVE_ONLY_STATIC,
FfiCode.FIELD_IN_STRUCT_WITH_INITIALIZER,
FfiCode.FIELD_INITIALIZER_IN_STRUCT,
FfiCode.FIELD_MUST_BE_EXTERNAL_IN_STRUCT,
diff --git a/pkg/analyzer/lib/src/dart/error/ffi_code.dart b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
index 639a3f3..d8600d8 100644
--- a/pkg/analyzer/lib/src/dart/error/ffi_code.dart
+++ b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
@@ -69,6 +69,14 @@
/**
* No parameters.
*/
+ static const FfiCode FFI_NATIVE_ONLY_STATIC = FfiCode(
+ name: 'FFI_NATIVE_ONLY_STATIC',
+ message: "FfiNative annotations can only be used on static functions.",
+ correction: "Change the method to static.");
+
+ /**
+ * No parameters.
+ */
static const FfiCode FIELD_IN_STRUCT_WITH_INITIALIZER = FfiCode(
name: 'FIELD_IN_STRUCT_WITH_INITIALIZER',
message:
diff --git a/pkg/analyzer/lib/src/generated/ffi_verifier.dart b/pkg/analyzer/lib/src/generated/ffi_verifier.dart
index 8382b13..ae2d2bc7 100644
--- a/pkg/analyzer/lib/src/generated/ffi_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/ffi_verifier.dart
@@ -23,6 +23,7 @@
static const _dartFfiLibraryName = 'dart.ffi';
static const _isLeafParamName = 'isLeaf';
static const _opaqueClassName = 'Opaque';
+ static const _ffiNativeName = 'FfiNative';
static const List<String> _primitiveIntegerNativeTypes = [
'Int8',
@@ -155,6 +156,12 @@
}
@override
+ void visitFunctionDeclaration(FunctionDeclaration node) {
+ _checkFfiNative(node);
+ super.visitFunctionDeclaration(node);
+ }
+
+ @override
void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
var element = node.staticElement;
if (element is MethodElement) {
@@ -196,6 +203,12 @@
}
@override
+ void visitMethodDeclaration(MethodDeclaration node) {
+ _checkFfiNative(node);
+ super.visitMethodDeclaration(node);
+ }
+
+ @override
void visitMethodInvocation(MethodInvocation node) {
var element = node.methodName.staticElement;
if (element is MethodElement) {
@@ -256,6 +269,24 @@
super.visitPropertyAccess(node);
}
+ void _checkFfiNative(Declaration node) {
+ NodeList<Annotation> annotations = node.metadata;
+ if (annotations.isEmpty) {
+ return;
+ }
+
+ for (Annotation annotation in annotations) {
+ if (annotation.name.name == _ffiNativeName) {
+ final isStatic = (node is FunctionDeclaration) ||
+ ((node is MethodDeclaration) && node.isStatic);
+ if (!isStatic) {
+ _errorReporter.reportErrorForNode(
+ FfiCode.FFI_NATIVE_ONLY_STATIC, node);
+ }
+ }
+ }
+ }
+
/// Returns `true` if [nativeType] is a C type that has a size.
bool _isSized(DartType nativeType) {
switch (_primitiveNativeType(nativeType)) {
diff --git a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
index 3aa1807..b20ece0 100644
--- a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
+++ b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
@@ -748,6 +748,12 @@
external T operator [](int index);
}
+
+class FfiNative<T> {
+ final String nativeName;
+ final bool isLeaf;
+ const FfiNative(this.nativeName, {this.isLeaf: false});
+}
''',
)
]);
diff --git a/pkg/analyzer/test/src/diagnostics/ffi_native_test.dart b/pkg/analyzer/test/src/diagnostics/ffi_native_test.dart
new file mode 100644
index 0000000..e90a157
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/ffi_native_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/error/ffi_code.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+ defineReflectiveSuite(() {
+ defineReflectiveTests(FfiNativeTest);
+ });
+}
+
+@reflectiveTest
+class FfiNativeTest extends PubPackageResolutionTest {
+ test_FfiNativeAnnotationOnInstanceMethod() async {
+ await assertErrorsInCode(r'''
+import 'dart:ffi';
+class K {
+ @FfiNative<Void Function()>('DoesntMatter')
+ external void doesntMatter();
+}
+''', [
+ error(FfiCode.FFI_NATIVE_ONLY_STATIC, 31, 75),
+ ]);
+ }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index fd81c75..49fbffe 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -193,6 +193,7 @@
as ffi_array_multi_non_positive_input_test;
import 'ffi_leaf_call_must_not_use_handle_test.dart'
as ffi_leaf_call_must_not_use_handle;
+import 'ffi_native_test.dart' as ffi_native_test;
import 'field_in_struct_with_initializer_test.dart'
as field_in_struct_with_initializer;
import 'field_initialized_by_multiple_initializers_test.dart'
@@ -844,6 +845,7 @@
extra_size_annotation_carray.main();
ffi_array_multi_non_positive_input_test.main();
ffi_leaf_call_must_not_use_handle.main();
+ ffi_native_test.main();
field_in_struct_with_initializer.main();
field_initialized_by_multiple_initializers.main();
final_initialized_in_declaration_and_constructor.main();
diff --git a/pkg/front_end/lib/src/api_unstable/vm.dart b/pkg/front_end/lib/src/api_unstable/vm.dart
index 35d7c8b..42a227f 100644
--- a/pkg/front_end/lib/src/api_unstable/vm.dart
+++ b/pkg/front_end/lib/src/api_unstable/vm.dart
@@ -53,6 +53,7 @@
messageFfiLeafCallMustNotReturnHandle,
messageFfiLeafCallMustNotTakeHandle,
messageFfiPackedAnnotationAlignment,
+ messageFfiNativeAnnotationMustAnnotateStatic,
messageNonPositiveArrayDimensions,
noLength,
templateFfiDartTypeMismatch,
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
index 04bbb31..010fd50 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -698,11 +698,13 @@
@override
TreeNode visitStaticTearOff(StaticTearOff node, TreeNode? removalSentinel) {
- final Member target = node.target;
- if (target is Procedure && target.kind == ProcedureKind.Method) {
- return evaluateAndTransformWithContext(node, node);
- }
- return super.visitStaticTearOff(node, removalSentinel);
+ return evaluateAndTransformWithContext(node, node);
+ }
+
+ @override
+ TreeNode visitConstructorTearOff(
+ ConstructorTearOff node, TreeNode? removalSentinel) {
+ return evaluateAndTransformWithContext(node, node);
}
@override
@@ -2928,21 +2930,7 @@
@override
Constant visitStaticTearOff(StaticTearOff node) {
- return withNewEnvironment(() {
- final Member target = node.target;
- if (target is Procedure) {
- if (target.kind == ProcedureKind.Method) {
- return canonicalize(new StaticTearOffConstant(target));
- }
- return createErrorConstant(
- node,
- templateConstEvalInvalidStaticInvocation
- .withArguments(target.name.text));
- } else {
- return createInvalidExpressionConstant(
- node, 'No support for ${target.runtimeType} in a static tear-off.');
- }
- });
+ return canonicalize(new StaticTearOffConstant(node.target));
}
@override
@@ -3393,11 +3381,16 @@
new Instantiation(extract(constant),
node.typeArguments.map((t) => env.substituteType(t)).toList()));
}
- if (constant is StaticTearOffConstant) {
- Procedure constantMember = constant.target;
- if (constantMember is Procedure) {
- if (node.typeArguments.length ==
- constantMember.function.typeParameters.length) {
+ if (constant is TearOffConstant) {
+ Member target = constant.target;
+ List<TypeParameter>? typeParameters;
+ if (target is Procedure) {
+ typeParameters = target.function.typeParameters;
+ } else if (target is Constructor) {
+ typeParameters = target.enclosingClass.typeParameters;
+ }
+ if (typeParameters != null) {
+ if (node.typeArguments.length == typeParameters.length) {
List<DartType>? types = _evaluateDartTypes(node, node.typeArguments);
if (types == null) {
AbortConstant error = _gotError!;
@@ -3424,7 +3417,7 @@
return createInvalidExpressionConstant(
node,
"Unsupported kind of a torn off member: "
- "'${constantMember.runtimeType}'.");
+ "'${target.runtimeType}'.");
}
}
// The inner expression in an instantiation can never be null, since
@@ -3436,8 +3429,7 @@
@override
Constant visitConstructorTearOff(ConstructorTearOff node) {
- // TODO(dmitryas): Add support for instantiated constructor tear-offs.
- return defaultExpression(node);
+ return canonicalize(new ConstructorTearOffConstant(node.target));
}
@override
diff --git a/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart b/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart
index f9863ea..a1f4efa 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constructor_tearoff_lowering.dart
@@ -8,16 +8,16 @@
import '../builder/member_builder.dart';
import '../source/source_library_builder.dart';
-const String _constructorTearOffNamePrefix = '_#';
-const String _constructorTearOffNameSuffix = '#tearOff';
+const String _tearOffNamePrefix = '_#';
+const String _tearOffNameSuffix = '#tearOff';
/// Creates the synthesized name to use for the lowering of the tear off of a
/// constructor or factory by the given [name] in [library].
Name constructorTearOffName(String name, Library library) {
return new Name(
- '$_constructorTearOffNamePrefix'
+ '$_tearOffNamePrefix'
'${name.isEmpty ? 'new' : name}'
- '$_constructorTearOffNameSuffix',
+ '$_tearOffNameSuffix',
library);
}
@@ -25,14 +25,13 @@
/// the synthesized name of a lowering of the tear off of a constructor or
/// factory. Returns `null` otherwise.
String? extractConstructorNameFromTearOff(Name name) {
- if (name.text.startsWith(_constructorTearOffNamePrefix) &&
- name.text.endsWith(_constructorTearOffNameSuffix) &&
+ if (name.text.startsWith(_tearOffNamePrefix) &&
+ name.text.endsWith(_tearOffNameSuffix) &&
name.text.length >
- _constructorTearOffNamePrefix.length +
- _constructorTearOffNameSuffix.length) {
- String text = name.text
- .substring(0, name.text.length - _constructorTearOffNameSuffix.length);
- text = text.substring(_constructorTearOffNamePrefix.length);
+ _tearOffNamePrefix.length + _tearOffNameSuffix.length) {
+ String text =
+ name.text.substring(0, name.text.length - _tearOffNameSuffix.length);
+ text = text.substring(_tearOffNamePrefix.length);
return text == 'new' ? '' : text;
}
return null;
@@ -200,3 +199,100 @@
tearOffParameter.initializer?.parent = tearOffParameter;
}
}
+
+/// Creates the synthesized name to use for the lowering of the tear off of a
+/// typedef in [library] using [index] for a unique name within the library.
+Name typedefTearOffName(int index, Library library) {
+ return new Name(
+ '$_tearOffNamePrefix'
+ '${index}'
+ '$_tearOffNameSuffix',
+ library);
+}
+
+/// Creates a top level procedure to be used as the lowering for the typedef
+/// tear off [node] of a target of type [targetType]. [fileUri] together with
+/// the `fileOffset` of [node] is used as the location for the procedure.
+/// [index] is used to create a unique name for the procedure within
+/// [libraryBuilder].
+Procedure createTypedefTearOffLowering(SourceLibraryBuilder libraryBuilder,
+ TypedefTearOff node, FunctionType targetType, Uri fileUri, int index) {
+ int fileOffset = node.fileOffset;
+ Procedure tearOff = new Procedure(
+ typedefTearOffName(index, libraryBuilder.library),
+ ProcedureKind.Method,
+ new FunctionNode(null),
+ fileUri: fileUri,
+ isStatic: true)
+ ..startFileOffset = fileOffset
+ ..fileOffset = fileOffset
+ ..fileEndOffset = fileOffset
+ ..isNonNullableByDefault = libraryBuilder.isNonNullableByDefault;
+ List<TypeParameter> typedefTypeParameters = node.typeParameters;
+ List<TypeParameter> typeParameters;
+ List<DartType> typeArguments = node.typeArguments;
+ Substitution substitution = Substitution.empty;
+ if (typedefTypeParameters.isNotEmpty) {
+ FreshTypeParameters freshTypeParameters =
+ getFreshTypeParameters(typedefTypeParameters);
+ typeParameters = freshTypeParameters.freshTypeParameters;
+ substitution = freshTypeParameters.substitution;
+ tearOff.function.typeParameters.addAll(typeParameters);
+ setParents(typeParameters, tearOff.function);
+ if (typeArguments.isNotEmpty) {
+ // Translate [typeArgument] into the context of the synthesized procedure.
+ typeArguments = new List<DartType>.generate(typeArguments.length,
+ (int index) => substitution.substituteType(typeArguments[index]));
+ }
+ } else {
+ typeParameters = [];
+ substitution = Substitution.empty;
+ }
+ if (typeArguments.isNotEmpty) {
+ // Instantiate [targetType] with [typeArguments].
+ targetType =
+ Substitution.fromPairs(targetType.typeParameters, typeArguments)
+ .substituteType(targetType.withoutTypeParameters) as FunctionType;
+ }
+
+ List<Expression> positionalArguments = [];
+ for (DartType constructorParameter in targetType.positionalParameters) {
+ VariableDeclaration tearOffParameter = new VariableDeclaration(null,
+ type: substitution.substituteType(constructorParameter))
+ ..fileOffset = fileOffset;
+ tearOff.function.positionalParameters.add(tearOffParameter);
+ positionalArguments
+ .add(new VariableGet(tearOffParameter)..fileOffset = fileOffset);
+ tearOffParameter.parent = tearOff.function;
+ }
+ List<NamedExpression> namedArguments = [];
+ for (NamedType constructorParameter in targetType.namedParameters) {
+ VariableDeclaration tearOffParameter = new VariableDeclaration(
+ constructorParameter.name,
+ type: substitution.substituteType(constructorParameter.type),
+ isRequired: constructorParameter.isRequired)
+ ..fileOffset = fileOffset;
+ tearOff.function.namedParameters.add(tearOffParameter);
+ tearOffParameter.parent = tearOff.function;
+ namedArguments.add(new NamedExpression(tearOffParameter.name!,
+ new VariableGet(tearOffParameter)..fileOffset = fileOffset)
+ ..fileOffset = fileOffset);
+ }
+ tearOff.function.returnType =
+ substitution.substituteType(targetType.returnType);
+ tearOff.function.requiredParameterCount = targetType.requiredParameterCount;
+
+ Arguments arguments = new Arguments(positionalArguments,
+ named: namedArguments, types: typeArguments)
+ ..fileOffset = tearOff.fileOffset;
+ Expression constructorInvocation = new FunctionInvocation(
+ FunctionAccessKind.FunctionType, node.expression, arguments,
+ functionType: targetType)
+ ..fileOffset = tearOff.fileOffset;
+ tearOff.function.body = new ReturnStatement(constructorInvocation)
+ ..fileOffset = tearOff.fileOffset
+ ..parent = tearOff.function;
+ tearOff.function.fileOffset = tearOff.fileOffset;
+ tearOff.function.fileEndOffset = tearOff.fileOffset;
+ return tearOff;
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 0c85ec0..a435c3d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -235,7 +235,6 @@
node.expression, const UnknownType(), true,
isVoidAllowed: true);
node.expression = expressionResult.expression..parent = node;
-
assert(
expressionResult.inferredType is FunctionType,
"Expected a FunctionType from tearing off a constructor from "
@@ -256,8 +255,16 @@
typeParameters: freshTypeParameters.freshTypeParameters,
requiredParameterCount: resultType.requiredParameterCount,
typedefType: null);
+ Expression replacement = node;
+ if (!inferrer.isTopLevel &&
+ inferrer.library.loader.target.backendTarget
+ .isTypedefTearOffLoweringEnabled) {
+ replacement = inferrer.library.getTypedefTearOffLowering(
+ node, expressionType, inferrer.helper!.uri);
+ }
+
ExpressionInferenceResult inferredResult =
- inferrer.instantiateTearOff(resultType, typeContext, node);
+ inferrer.instantiateTearOff(resultType, typeContext, replacement);
Expression ensuredResultExpression =
inferrer.ensureAssignableResult(typeContext, inferredResult);
return new ExpressionInferenceResult(
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index b3bcc83..102a830 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -12,9 +12,6 @@
import 'package:_fe_analyzer_shared/src/util/resolve_relative_uri.dart'
show resolveRelativeUri;
-import 'package:front_end/src/fasta/dill/dill_library_builder.dart'
- show DillLibraryBuilder;
-
import 'package:kernel/ast.dart' hide Combinator, MapLiteralEntry;
import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
@@ -74,6 +71,8 @@
import '../configuration.dart' show Configuration;
+import '../dill/dill_library_builder.dart' show DillLibraryBuilder;
+
import '../export.dart' show Export;
import '../fasta_codes.dart';
@@ -82,6 +81,8 @@
import '../import.dart' show Import;
+import '../kernel/constructor_tearoff_lowering.dart';
+
import '../kernel/internal_ast.dart';
import '../kernel/kernel_builder.dart'
@@ -4232,6 +4233,17 @@
}
uncheckedTypedefTypes.clear();
}
+
+ int _typedefTearOffLoweringIndex = 0;
+
+ Expression getTypedefTearOffLowering(
+ TypedefTearOff node, FunctionType targetType, Uri fileUri) {
+ assert(loader.target.backendTarget.isTypedefTearOffLoweringEnabled);
+ Procedure tearOff = createTypedefTearOffLowering(
+ this, node, targetType, fileUri, _typedefTearOffLoweringIndex++);
+ library.addProcedure(tearOff);
+ return new StaticTearOff(tearOff)..fileOffset = node.fileOffset;
+ }
}
// The kind of type parameter scope built by a [TypeParameterScopeBuilder]
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index fe7c2c6..f157d7b 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -210,8 +210,14 @@
/// inside a closure.
ClosureContext? closureContext;
- TypeInferrerImpl(this.engine, this.uriForInstrumentation, bool topLevel,
- this.thisType, this.library, this.assignedVariables, this.dataForTesting)
+ TypeInferrerImpl(
+ this.engine,
+ this.uriForInstrumentation,
+ bool topLevel,
+ this.thisType,
+ this.library,
+ this.assignedVariables,
+ this.dataForTesting)
// ignore: unnecessary_null_comparison
: assert(library != null),
unknownFunction = new FunctionType(
@@ -226,7 +232,7 @@
assignedVariables)
: new FlowAnalysis.legacy(
new TypeOperationsCfe(engine.typeSchemaEnvironment),
- assignedVariables);
+ assignedVariables) {}
CoreTypes get coreTypes => engine.coreTypes;
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index f6e79b9a..76faff7 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -340,6 +340,7 @@
FfiFieldNull/analyzerCode: Fail
FfiLeafCallMustNotReturnHandle/analyzerCode: Fail
FfiLeafCallMustNotTakeHandle/analyzerCode: Fail
+FfiNativeAnnotationMustAnnotateStatic/analyzerCode: Fail
FfiNotStatic/analyzerCode: Fail
FfiPackedAnnotation/analyzerCode: Fail
FfiPackedAnnotationAlignment/analyzerCode: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 84ed8c2..58334a0 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -4537,6 +4537,11 @@
template: "FFI leaf call must not have Handle return type."
external: test/ffi_test.dart
+FfiNativeAnnotationMustAnnotateStatic:
+ # Used by dart:ffi
+ template: "FfiNative annotations can only be used on static functions."
+ external: test/ffi_test.dart
+
SpreadTypeMismatch:
template: "Unexpected type '#type' of a spread. Expected 'dynamic' or an Iterable."
script:
diff --git a/pkg/front_end/test/spell_checking_list_common.txt b/pkg/front_end/test/spell_checking_list_common.txt
index 816ad78..0b93c1a 100644
--- a/pkg/front_end/test/spell_checking_list_common.txt
+++ b/pkg/front_end/test/spell_checking_list_common.txt
@@ -1179,6 +1179,7 @@
fetch
few
fewer
+ffinative
field
field's
fieldname
diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt
index 4d4aa59..922e0ac 100644
--- a/pkg/front_end/test/spell_checking_list_tests.txt
+++ b/pkg/front_end/test/spell_checking_list_tests.txt
@@ -119,6 +119,8 @@
c3b
c3c
c3d
+c3e
+c3f
c4a
c4b
c4c
@@ -332,6 +334,10 @@
f3
f3a
f3b
+f3c
+f3d
+f3e
+f3f
f4
f4a
f4b
diff --git a/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.strong.expect
index e8c1280..7435151 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.strong.expect
@@ -46,14 +46,14 @@
extension Extension on core::int {
}
static method test() → dynamic {
- self::ConcreteClass::•;
+ #C1;
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:14:17: Error: Constructors on abstract classes can't be torn off.
AbstractClass.new; // error
^^^";
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:15:9: Error: Getter not found: 'new'.
Mixin.new; // error
^^^";
- self::NamedMixinApplication::•;
+ #C2;
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:17:33: Error: Constructors on abstract classes can't be torn off.
AbstractNamedMixinApplication.new; // error
^^^";
@@ -62,3 +62,8 @@
^^^";
}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::ConcreteClass::•
+ #C2 = constructor-tearoff self::NamedMixinApplication::•
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.strong.transformed.expect
index b86fac8..2b7289e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.strong.transformed.expect
@@ -46,14 +46,14 @@
extension Extension on core::int {
}
static method test() → dynamic {
- self::ConcreteClass::•;
+ #C1;
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:14:17: Error: Constructors on abstract classes can't be torn off.
AbstractClass.new; // error
^^^";
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:15:9: Error: Getter not found: 'new'.
Mixin.new; // error
^^^";
- self::NamedMixinApplication::•;
+ #C2;
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:17:33: Error: Constructors on abstract classes can't be torn off.
AbstractNamedMixinApplication.new; // error
^^^";
@@ -62,3 +62,8 @@
^^^";
}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::ConcreteClass::•
+ #C2 = constructor-tearoff self::NamedMixinApplication::•
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.weak.expect
index e8c1280..7435151 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.weak.expect
@@ -46,14 +46,14 @@
extension Extension on core::int {
}
static method test() → dynamic {
- self::ConcreteClass::•;
+ #C1;
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:14:17: Error: Constructors on abstract classes can't be torn off.
AbstractClass.new; // error
^^^";
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:15:9: Error: Getter not found: 'new'.
Mixin.new; // error
^^^";
- self::NamedMixinApplication::•;
+ #C2;
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:17:33: Error: Constructors on abstract classes can't be torn off.
AbstractNamedMixinApplication.new; // error
^^^";
@@ -62,3 +62,8 @@
^^^";
}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::ConcreteClass::•
+ #C2 = constructor-tearoff self::NamedMixinApplication::•
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.weak.transformed.expect
index b86fac8..2b7289e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart.weak.transformed.expect
@@ -46,14 +46,14 @@
extension Extension on core::int {
}
static method test() → dynamic {
- self::ConcreteClass::•;
+ #C1;
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:14:17: Error: Constructors on abstract classes can't be torn off.
AbstractClass.new; // error
^^^";
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:15:9: Error: Getter not found: 'new'.
Mixin.new; // error
^^^";
- self::NamedMixinApplication::•;
+ #C2;
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/abstract_class_constructor_tear_off.dart:17:33: Error: Constructors on abstract classes can't be torn off.
AbstractNamedMixinApplication.new; // error
^^^";
@@ -62,3 +62,8 @@
^^^";
}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::ConcreteClass::•
+ #C2 = constructor-tearoff self::NamedMixinApplication::•
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.expect
index 2d0b3bf..bdc66d1 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.expect
@@ -18,5 +18,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::func
+ #C1 = static-tearoff self::func
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.transformed.expect
index 2d0b3bf..bdc66d1 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.strong.transformed.expect
@@ -18,5 +18,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::func
+ #C1 = static-tearoff self::func
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.expect
index 2d0b3bf..bdc66d1 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.expect
@@ -18,5 +18,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::func
+ #C1 = static-tearoff self::func
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.transformed.expect
index 2d0b3bf..bdc66d1 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.weak.transformed.expect
@@ -18,5 +18,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::func
+ #C1 = static-tearoff self::func
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.expect
index efd5a53..ceaf4af 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.expect
@@ -92,12 +92,12 @@
}
constants {
- #C1 = tearoff self::C::stat
- #C2 = partial-instantiation self::C::stat <core::int>
- #C3 = tearoff self::M::mstat
- #C4 = partial-instantiation self::M::mstat <core::int>
- #C5 = tearoff self::Ext|estat
- #C6 = partial-instantiation self::Ext|estat <core::int>
+ #C1 = static-tearoff self::C::stat
+ #C2 = instantiation self::C::stat <core::int>
+ #C3 = static-tearoff self::M::mstat
+ #C4 = instantiation self::M::mstat <core::int>
+ #C5 = static-tearoff self::Ext|estat
+ #C6 = instantiation self::Ext|estat <core::int>
#C7 = TypeLiteralConstant(core::List<core::int>)
#C8 = TypeLiteralConstant(core::List<core::List<core::int>>)
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.transformed.expect
index ba6e6f0..aa394b3 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.strong.transformed.expect
@@ -100,12 +100,12 @@
}
constants {
- #C1 = tearoff self::C::stat
- #C2 = partial-instantiation self::C::stat <core::int>
- #C3 = tearoff self::M::mstat
- #C4 = partial-instantiation self::M::mstat <core::int>
- #C5 = tearoff self::Ext|estat
- #C6 = partial-instantiation self::Ext|estat <core::int>
+ #C1 = static-tearoff self::C::stat
+ #C2 = instantiation self::C::stat <core::int>
+ #C3 = static-tearoff self::M::mstat
+ #C4 = instantiation self::M::mstat <core::int>
+ #C5 = static-tearoff self::Ext|estat
+ #C6 = instantiation self::Ext|estat <core::int>
#C7 = TypeLiteralConstant(core::List<core::int>)
#C8 = TypeLiteralConstant(core::List<core::List<core::int>>)
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.expect
index 70f8b63..ea4ceb1 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.expect
@@ -92,12 +92,12 @@
}
constants {
- #C1 = tearoff self::C::stat
- #C2 = partial-instantiation self::C::stat <core::int*>
- #C3 = tearoff self::M::mstat
- #C4 = partial-instantiation self::M::mstat <core::int*>
- #C5 = tearoff self::Ext|estat
- #C6 = partial-instantiation self::Ext|estat <core::int*>
+ #C1 = static-tearoff self::C::stat
+ #C2 = instantiation self::C::stat <core::int*>
+ #C3 = static-tearoff self::M::mstat
+ #C4 = instantiation self::M::mstat <core::int*>
+ #C5 = static-tearoff self::Ext|estat
+ #C6 = instantiation self::Ext|estat <core::int*>
#C7 = TypeLiteralConstant(core::List<core::int*>*)
#C8 = TypeLiteralConstant(core::List<core::List<core::int*>*>*)
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.transformed.expect
index 217f0b6..fc6c975 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation.dart.weak.transformed.expect
@@ -100,12 +100,12 @@
}
constants {
- #C1 = tearoff self::C::stat
- #C2 = partial-instantiation self::C::stat <core::int*>
- #C3 = tearoff self::M::mstat
- #C4 = partial-instantiation self::M::mstat <core::int*>
- #C5 = tearoff self::Ext|estat
- #C6 = partial-instantiation self::Ext|estat <core::int*>
+ #C1 = static-tearoff self::C::stat
+ #C2 = instantiation self::C::stat <core::int*>
+ #C3 = static-tearoff self::M::mstat
+ #C4 = instantiation self::M::mstat <core::int*>
+ #C5 = static-tearoff self::Ext|estat
+ #C6 = instantiation self::Ext|estat <core::int*>
#C7 = TypeLiteralConstant(core::List<core::int*>*)
#C8 = TypeLiteralConstant(core::List<core::List<core::int*>*>*)
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.strong.expect
index 7d47228..630fe40 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.strong.expect
@@ -105,8 +105,8 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int>
- #C3 = tearoff self::boundedMethod
- #C4 = partial-instantiation self::boundedMethod <core::String>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int>
+ #C3 = static-tearoff self::boundedMethod
+ #C4 = instantiation self::boundedMethod <core::String>
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.strong.transformed.expect
index 7d47228..630fe40 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.strong.transformed.expect
@@ -105,8 +105,8 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int>
- #C3 = tearoff self::boundedMethod
- #C4 = partial-instantiation self::boundedMethod <core::String>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int>
+ #C3 = static-tearoff self::boundedMethod
+ #C4 = instantiation self::boundedMethod <core::String>
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.weak.expect
index c32e295..2e9d2db 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.weak.expect
@@ -105,8 +105,8 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int*>
- #C3 = tearoff self::boundedMethod
- #C4 = partial-instantiation self::boundedMethod <core::String*>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int*>
+ #C3 = static-tearoff self::boundedMethod
+ #C4 = instantiation self::boundedMethod <core::String*>
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.weak.transformed.expect
index c32e295..2e9d2db 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.weak.transformed.expect
@@ -105,8 +105,8 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int*>
- #C3 = tearoff self::boundedMethod
- #C4 = partial-instantiation self::boundedMethod <core::String*>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int*>
+ #C3 = static-tearoff self::boundedMethod
+ #C4 = instantiation self::boundedMethod <core::String*>
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect
index 3ac9d56..fdd4fb7 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.expect
@@ -4,14 +4,14 @@
//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13: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/*1*/' is from 'unknown'.
// - '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:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+// - 'X/*1*/' is from 'unknown'.
// - 'X/*2*/' is from 'unknown'.
// A<X> Function<X>(X) test3() => A.new; // Error.
// ^
@@ -68,26 +68,26 @@
return new self::A::•<self::A::bar1::X%>();
}
static method test1() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return #C1;
static method test2() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13: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/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test2() => A.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C2) as{TypeError,ForNonNullableByDefault} Never;
static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+ - 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test3() => A.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} Never;
static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test4() => A<int>.new; // Error.
- ^" in (self::A::•<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} Never;
static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -97,7 +97,7 @@
return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
- ^" in (self::A::foo1<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C5) as{TypeError,ForNonNullableByDefault} Never;
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:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -107,23 +107,34 @@
return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^" in (self::A::foo2<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C6) 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:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
^";
static method test10() → <X extends core::Object? = dynamic>() → self::A<X%>
- return self::A::bar1;
+ return #C7;
static method test11() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test11() => A.bar1; // Error.
- ^" in self::A::bar1 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C7) as{TypeError,ForNonNullableByDefault} Never;
static method test12() → () → self::A<core::int>
- return self::A::bar1<core::int>;
+ return #C8;
static method test13() → () → self::A<core::int>
- return self::A::bar1<core::int>;
+ return #C8;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo1
+ #C2 = constructor-tearoff self::A::foo2
+ #C3 = constructor-tearoff self::A::•
+ #C4 = instantiation self::A::• <core::int>
+ #C5 = instantiation self::A::foo1 <core::int>
+ #C6 = instantiation self::A::foo2 <core::int>
+ #C7 = static-tearoff self::A::bar1
+ #C8 = instantiation self::A::bar1 <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect
index 3ac9d56..fdd4fb7 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.strong.transformed.expect
@@ -4,14 +4,14 @@
//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13: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/*1*/' is from 'unknown'.
// - '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:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+// - 'X/*1*/' is from 'unknown'.
// - 'X/*2*/' is from 'unknown'.
// A<X> Function<X>(X) test3() => A.new; // Error.
// ^
@@ -68,26 +68,26 @@
return new self::A::•<self::A::bar1::X%>();
}
static method test1() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return #C1;
static method test2() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13: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/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test2() => A.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C2) as{TypeError,ForNonNullableByDefault} Never;
static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+ - 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test3() => A.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} Never;
static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test4() => A<int>.new; // Error.
- ^" in (self::A::•<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} Never;
static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -97,7 +97,7 @@
return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
- ^" in (self::A::foo1<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C5) as{TypeError,ForNonNullableByDefault} Never;
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:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -107,23 +107,34 @@
return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^" in (self::A::foo2<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C6) 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:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
^";
static method test10() → <X extends core::Object? = dynamic>() → self::A<X%>
- return self::A::bar1;
+ return #C7;
static method test11() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test11() => A.bar1; // Error.
- ^" in self::A::bar1 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C7) as{TypeError,ForNonNullableByDefault} Never;
static method test12() → () → self::A<core::int>
- return self::A::bar1<core::int>;
+ return #C8;
static method test13() → () → self::A<core::int>
- return self::A::bar1<core::int>;
+ return #C8;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo1
+ #C2 = constructor-tearoff self::A::foo2
+ #C3 = constructor-tearoff self::A::•
+ #C4 = instantiation self::A::• <core::int>
+ #C5 = instantiation self::A::foo1 <core::int>
+ #C6 = instantiation self::A::foo2 <core::int>
+ #C7 = static-tearoff self::A::bar1
+ #C8 = instantiation self::A::bar1 <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect
index 3ac9d56..b0da904 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.expect
@@ -4,14 +4,14 @@
//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13: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/*1*/' is from 'unknown'.
// - '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:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+// - 'X/*1*/' is from 'unknown'.
// - 'X/*2*/' is from 'unknown'.
// A<X> Function<X>(X) test3() => A.new; // Error.
// ^
@@ -68,26 +68,26 @@
return new self::A::•<self::A::bar1::X%>();
}
static method test1() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return #C1;
static method test2() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13: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/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test2() => A.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C2) as{TypeError,ForNonNullableByDefault} Never;
static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+ - 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test3() => A.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} Never;
static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test4() => A<int>.new; // Error.
- ^" in (self::A::•<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} Never;
static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -97,7 +97,7 @@
return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
- ^" in (self::A::foo1<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C5) as{TypeError,ForNonNullableByDefault} Never;
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:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -107,23 +107,34 @@
return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^" in (self::A::foo2<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C6) 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:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
^";
static method test10() → <X extends core::Object? = dynamic>() → self::A<X%>
- return self::A::bar1;
+ return #C7;
static method test11() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test11() => A.bar1; // Error.
- ^" in self::A::bar1 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C7) as{TypeError,ForNonNullableByDefault} Never;
static method test12() → () → self::A<core::int>
- return self::A::bar1<core::int>;
+ return #C8;
static method test13() → () → self::A<core::int>
- return self::A::bar1<core::int>;
+ return #C8;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo1
+ #C2 = constructor-tearoff self::A::foo2
+ #C3 = constructor-tearoff self::A::•
+ #C4 = instantiation self::A::• <core::int*>
+ #C5 = instantiation self::A::foo1 <core::int*>
+ #C6 = instantiation self::A::foo2 <core::int*>
+ #C7 = static-tearoff self::A::bar1
+ #C8 = instantiation self::A::bar1 <core::int*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect
index 3ac9d56..b0da904 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.weak.transformed.expect
@@ -4,14 +4,14 @@
//
// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13: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/*1*/' is from 'unknown'.
// - '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:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
// - 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
-// - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+// - 'X/*1*/' is from 'unknown'.
// - 'X/*2*/' is from 'unknown'.
// A<X> Function<X>(X) test3() => A.new; // Error.
// ^
@@ -68,26 +68,26 @@
return new self::A::•<self::A::bar1::X%>();
}
static method test1() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
- return self::A::foo1;
+ return #C1;
static method test2() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:13: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/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test2() => A.foo2; // Error.
- ^" in self::A::foo2 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C2) as{TypeError,ForNonNullableByDefault} Never;
static method test3() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:14:32: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- - 'X/*1*/' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
+ - 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test3() => A.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} Never;
static method test4() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:15:32: Error: A value of type 'A<int> Function()' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test4() => A<int>.new; // Error.
- ^" in (self::A::•<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} Never;
static method test5() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:16:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -97,7 +97,7 @@
return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:17:32: Error: A value of type 'A<int> Function(int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test6() => A<int>.foo1; // Error.
- ^" in (self::A::foo1<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C5) as{TypeError,ForNonNullableByDefault} Never;
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:18:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -107,23 +107,34 @@
return let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:19:32: Error: A value of type 'A<int> Function(int, int)' can't be returned from a function with return type 'A<X> Function<X>(X)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
A<X> Function<X>(X) test8() => A<int>.foo2; // Error.
- ^" in (self::A::foo2<core::int>) as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C6) 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:20:32: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
A<X> Function<X>(X) test9() => A<int, String>.foo2; // Error.
^";
static method test10() → <X extends core::Object? = dynamic>() → self::A<X%>
- return self::A::bar1;
+ return #C7;
static method test11() → <X extends core::Object? = dynamic>(X%) → self::A<X%>
return let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart:22:33: Error: A value of type 'A<X/*1*/> Function<X>()' can't be returned from a function with return type 'A<X/*2*/> Function<X>(X/*2*/)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart'.
- 'X/*1*/' is from 'unknown'.
- 'X/*2*/' is from 'unknown'.
A<X> Function<X>(X) test11() => A.bar1; // Error.
- ^" in self::A::bar1 as{TypeError,ForNonNullableByDefault} Never;
+ ^" in (#C7) as{TypeError,ForNonNullableByDefault} Never;
static method test12() → () → self::A<core::int>
- return self::A::bar1<core::int>;
+ return #C8;
static method test13() → () → self::A<core::int>
- return self::A::bar1<core::int>;
+ return #C8;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo1
+ #C2 = constructor-tearoff self::A::foo2
+ #C3 = constructor-tearoff self::A::•
+ #C4 = instantiation self::A::• <core::int*>
+ #C5 = instantiation self::A::foo1 <core::int*>
+ #C6 = instantiation self::A::foo2 <core::int*>
+ #C7 = static-tearoff self::A::bar1
+ #C8 = instantiation self::A::bar1 <core::int*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart
index b668e20..ad3a27c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart
@@ -19,4 +19,17 @@
testNewExtraArgs() => A<int, String>.new; // Error.
testBarExtraArgs() => A<int, String>.bar; // Error.
+method() {
+ var foo = A.foo; // Ok.
+ var fooArgs = A<int>.foo; // Ok.
+ var _new = A.new; // Ok.
+ var newArgs = A<int>.new; // Ok.
+ var bar = A.bar; // Ok.
+ var barArgs = A<int>.bar; // Ok.
+
+ var fooExtraArgs = A<int, String>.foo; // Error.
+ var newExtraArgs = A<int, String>.new; // Error.
+ var barExtraArgs = A<int, String>.bar; // Error.
+}
+
main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.expect
index b9ace2c..8aa8628 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.expect
@@ -17,6 +17,21 @@
// testBarExtraArgs() => A<int, String>.bar; // Error.
// ^
//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:30:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var fooExtraArgs = A<int, String>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:31:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var newExtraArgs = A<int, String>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:32:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var barExtraArgs = A<int, String>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -29,17 +44,17 @@
return new self::A::•<self::A::bar::X%>();
}
static method testFoo() → dynamic
- return self::A::foo;
+ return #C1;
static method testFooArgs() → dynamic
- return self::A::foo<core::int>;
+ return #C2;
static method testNew() → dynamic
- return self::A::•;
+ return #C3;
static method testNewArgs() → dynamic
- return self::A::•<core::int>;
+ return #C4;
static method testBar() → dynamic
- return self::A::bar;
+ return #C5;
static method testBarArgs() → dynamic
- return self::A::bar<core::int>;
+ return #C6;
static method testFooExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -55,4 +70,33 @@
Try removing the extra type arguments.
testBarExtraArgs() => A<int, String>.bar; // Error.
^";
+static method method() → dynamic {
+ <X extends core::Object? = dynamic>() → self::A<X%> foo = #C1;
+ () → self::A<core::int> fooArgs = #C2;
+ <X extends core::Object? = dynamic>() → self::A<X%> _new = #C3;
+ () → self::A<core::int> newArgs = #C4;
+ <X extends core::Object? = dynamic>() → self::A<X%> bar = #C5;
+ () → self::A<core::int> barArgs = #C6;
+ invalid-type fooExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:30:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var fooExtraArgs = A<int, String>.foo; // Error.
+ ^";
+ invalid-type newExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:31:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var newExtraArgs = A<int, String>.new; // Error.
+ ^";
+ invalid-type barExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:32:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var barExtraArgs = A<int, String>.bar; // Error.
+ ^";
+}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = instantiation self::A::foo <core::int>
+ #C3 = constructor-tearoff self::A::•
+ #C4 = instantiation self::A::• <core::int>
+ #C5 = static-tearoff self::A::bar
+ #C6 = instantiation self::A::bar <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.transformed.expect
index b9ace2c..8aa8628 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.strong.transformed.expect
@@ -17,6 +17,21 @@
// testBarExtraArgs() => A<int, String>.bar; // Error.
// ^
//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:30:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var fooExtraArgs = A<int, String>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:31:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var newExtraArgs = A<int, String>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:32:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var barExtraArgs = A<int, String>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -29,17 +44,17 @@
return new self::A::•<self::A::bar::X%>();
}
static method testFoo() → dynamic
- return self::A::foo;
+ return #C1;
static method testFooArgs() → dynamic
- return self::A::foo<core::int>;
+ return #C2;
static method testNew() → dynamic
- return self::A::•;
+ return #C3;
static method testNewArgs() → dynamic
- return self::A::•<core::int>;
+ return #C4;
static method testBar() → dynamic
- return self::A::bar;
+ return #C5;
static method testBarArgs() → dynamic
- return self::A::bar<core::int>;
+ return #C6;
static method testFooExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -55,4 +70,33 @@
Try removing the extra type arguments.
testBarExtraArgs() => A<int, String>.bar; // Error.
^";
+static method method() → dynamic {
+ <X extends core::Object? = dynamic>() → self::A<X%> foo = #C1;
+ () → self::A<core::int> fooArgs = #C2;
+ <X extends core::Object? = dynamic>() → self::A<X%> _new = #C3;
+ () → self::A<core::int> newArgs = #C4;
+ <X extends core::Object? = dynamic>() → self::A<X%> bar = #C5;
+ () → self::A<core::int> barArgs = #C6;
+ invalid-type fooExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:30:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var fooExtraArgs = A<int, String>.foo; // Error.
+ ^";
+ invalid-type newExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:31:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var newExtraArgs = A<int, String>.new; // Error.
+ ^";
+ invalid-type barExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:32:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var barExtraArgs = A<int, String>.bar; // Error.
+ ^";
+}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = instantiation self::A::foo <core::int>
+ #C3 = constructor-tearoff self::A::•
+ #C4 = instantiation self::A::• <core::int>
+ #C5 = static-tearoff self::A::bar
+ #C6 = instantiation self::A::bar <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline.expect
index 4b026de..a5d04bf 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline.expect
@@ -12,4 +12,5 @@
testFooExtraArgs() => A<int, String>.foo;
testNewExtraArgs() => A<int, String>.new;
testBarExtraArgs() => A<int, String>.bar;
+method() {}
main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.expect
index b9ace2c..c49c929 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.expect
@@ -17,6 +17,21 @@
// testBarExtraArgs() => A<int, String>.bar; // Error.
// ^
//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:30:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var fooExtraArgs = A<int, String>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:31:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var newExtraArgs = A<int, String>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:32:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var barExtraArgs = A<int, String>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -29,17 +44,17 @@
return new self::A::•<self::A::bar::X%>();
}
static method testFoo() → dynamic
- return self::A::foo;
+ return #C1;
static method testFooArgs() → dynamic
- return self::A::foo<core::int>;
+ return #C2;
static method testNew() → dynamic
- return self::A::•;
+ return #C3;
static method testNewArgs() → dynamic
- return self::A::•<core::int>;
+ return #C4;
static method testBar() → dynamic
- return self::A::bar;
+ return #C5;
static method testBarArgs() → dynamic
- return self::A::bar<core::int>;
+ return #C6;
static method testFooExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -55,4 +70,33 @@
Try removing the extra type arguments.
testBarExtraArgs() => A<int, String>.bar; // Error.
^";
+static method method() → dynamic {
+ <X extends core::Object? = dynamic>() → self::A<X%> foo = #C1;
+ () → self::A<core::int> fooArgs = #C2;
+ <X extends core::Object? = dynamic>() → self::A<X%> _new = #C3;
+ () → self::A<core::int> newArgs = #C4;
+ <X extends core::Object? = dynamic>() → self::A<X%> bar = #C5;
+ () → self::A<core::int> barArgs = #C6;
+ invalid-type fooExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:30:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var fooExtraArgs = A<int, String>.foo; // Error.
+ ^";
+ invalid-type newExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:31:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var newExtraArgs = A<int, String>.new; // Error.
+ ^";
+ invalid-type barExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:32:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var barExtraArgs = A<int, String>.bar; // Error.
+ ^";
+}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = instantiation self::A::foo <core::int*>
+ #C3 = constructor-tearoff self::A::•
+ #C4 = instantiation self::A::• <core::int*>
+ #C5 = static-tearoff self::A::bar
+ #C6 = instantiation self::A::bar <core::int*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.outline.expect
index e5848bc..928b5e1 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.outline.expect
@@ -28,5 +28,7 @@
;
static method testBarExtraArgs() → dynamic
;
+static method method() → dynamic
+ ;
static method main() → dynamic
;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.transformed.expect
index b9ace2c..c49c929 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.weak.transformed.expect
@@ -17,6 +17,21 @@
// testBarExtraArgs() => A<int, String>.bar; // Error.
// ^
//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:30:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var fooExtraArgs = A<int, String>.foo; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:31:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var newExtraArgs = A<int, String>.new; // Error.
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:32:22: Error: Too many type arguments: 1 allowed, but 2 found.
+// Try removing the extra type arguments.
+// var barExtraArgs = A<int, String>.bar; // Error.
+// ^
+//
import self as self;
import "dart:core" as core;
@@ -29,17 +44,17 @@
return new self::A::•<self::A::bar::X%>();
}
static method testFoo() → dynamic
- return self::A::foo;
+ return #C1;
static method testFooArgs() → dynamic
- return self::A::foo<core::int>;
+ return #C2;
static method testNew() → dynamic
- return self::A::•;
+ return #C3;
static method testNewArgs() → dynamic
- return self::A::•<core::int>;
+ return #C4;
static method testBar() → dynamic
- return self::A::bar;
+ return #C5;
static method testBarArgs() → dynamic
- return self::A::bar<core::int>;
+ return #C6;
static method testFooExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:18:23: Error: Too many type arguments: 1 allowed, but 2 found.
Try removing the extra type arguments.
@@ -55,4 +70,33 @@
Try removing the extra type arguments.
testBarExtraArgs() => A<int, String>.bar; // Error.
^";
+static method method() → dynamic {
+ <X extends core::Object? = dynamic>() → self::A<X%> foo = #C1;
+ () → self::A<core::int> fooArgs = #C2;
+ <X extends core::Object? = dynamic>() → self::A<X%> _new = #C3;
+ () → self::A<core::int> newArgs = #C4;
+ <X extends core::Object? = dynamic>() → self::A<X%> bar = #C5;
+ () → self::A<core::int> barArgs = #C6;
+ invalid-type fooExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:30:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var fooExtraArgs = A<int, String>.foo; // Error.
+ ^";
+ invalid-type newExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:31:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var newExtraArgs = A<int, String>.new; // Error.
+ ^";
+ invalid-type barExtraArgs = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart:32:22: Error: Too many type arguments: 1 allowed, but 2 found.
+Try removing the extra type arguments.
+ var barExtraArgs = A<int, String>.bar; // Error.
+ ^";
+}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = instantiation self::A::foo <core::int*>
+ #C3 = constructor-tearoff self::A::•
+ #C4 = instantiation self::A::• <core::int*>
+ #C5 = static-tearoff self::A::bar
+ #C6 = instantiation self::A::bar <core::int*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.strong.expect
index 8df289d3..5edad1d 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.strong.expect
@@ -46,7 +46,7 @@
}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int>
- #C3 = partial-instantiation self::id <core::String>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int>
+ #C3 = instantiation self::id <core::String>
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.strong.transformed.expect
index 3afa4cf..f2e9fea 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.strong.transformed.expect
@@ -46,9 +46,9 @@
}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int>
- #C3 = partial-instantiation self::id <core::String>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int>
+ #C3 = instantiation self::id <core::String>
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.weak.expect
index c33a355..7061d34 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.weak.expect
@@ -46,7 +46,7 @@
}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int*>
- #C3 = partial-instantiation self::id <core::String*>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int*>
+ #C3 = instantiation self::id <core::String*>
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.weak.transformed.expect
index 9cdfa3c..8923c73 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.weak.transformed.expect
@@ -46,9 +46,9 @@
}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int*>
- #C3 = partial-instantiation self::id <core::String*>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int*>
+ #C3 = instantiation self::id <core::String*>
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.expect
index 33ffc2b..547e506 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.expect
@@ -7,18 +7,12 @@
// 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:17: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) test6() => A.new; // 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:23:41: 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'.
@@ -38,27 +32,42 @@
return new self::A::•<self::A::bar::X>(x);
}
static method test1() → (core::num) → self::A<core::num>
- return self::A::foo<core::num>;
+ return #C2;
static method test2() → (core::int) → self::A<core::int>
- return self::A::foo<core::int>;
+ return #C3;
static method test3() → (core::num) → self::A<core::num>
- return self::A::•<core::num>;
+ return #C5;
static method test4() → (core::int) → self::A<core::int>
- return self::A::•<core::int>;
+ return #C6;
static method test5() → (core::String) → self::A<dynamic>
- return self::A::foo<core::String>;
+ return #C7;
static method test6() → (core::String) → self::A<dynamic>
- return self::A::•<core::String>;
+ return #C8;
static method test7() → (core::num) → self::A<dynamic>
- return self::A::foo<core::num>;
+ return #C2;
static method test8() → (core::num) → self::A<dynamic>
- return self::A::•<core::num>;
+ return #C5;
static method test9() → (core::num) → self::A<core::num>
- return self::A::bar<core::num>;
+ return #C10;
static method test10() → (core::int) → self::A<core::int>
- return self::A::bar<core::int>;
+ return #C11;
static method test11() → (core::String) → self::A<dynamic>
- return self::A::bar<core::String>;
+ return #C12;
static method test12() → (core::num) → self::A<dynamic>
- return self::A::bar<core::num>;
+ return #C10;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = instantiation self::A::foo <core::num>
+ #C3 = instantiation self::A::foo <core::int>
+ #C4 = constructor-tearoff self::A::•
+ #C5 = instantiation self::A::• <core::num>
+ #C6 = instantiation self::A::• <core::int>
+ #C7 = instantiation self::A::foo <core::String>
+ #C8 = instantiation self::A::• <core::String>
+ #C9 = static-tearoff self::A::bar
+ #C10 = instantiation self::A::bar <core::num>
+ #C11 = instantiation self::A::bar <core::int>
+ #C12 = instantiation self::A::bar <core::String>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.transformed.expect
index 3bcaa2b..547e506 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.strong.transformed.expect
@@ -2,37 +2,23 @@
//
// 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.
-// ^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:13:35: Error: Getter not found: 'new'.
-// 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:16: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:16:42: Error: Getter not found: 'new'.
+// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:17: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) 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.
-// ^^^
+// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:23:41: 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) test11() => A.bar; // Error.
+// ^
//
import self as self;
import "dart:core" as core;
@@ -42,37 +28,46 @@
: super core::Object::•() {}
constructor •(self::A::X x) → self::A<self::A::X>
: super core::Object::•() {}
+ static factory bar<X extends core::num>(self::A::bar::X x) → self::A<self::A::bar::X>
+ return new self::A::•<self::A::bar::X>(x);
}
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.
- ^^^";
+ return #C2;
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.
- ^^^";
+ return #C3;
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.
- ^^^";
+ return #C5;
static method test4() → (core::int) → self::A<core::int>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:13:35: Error: Getter not found: 'new'.
-A<int> Function(int) test4() => A.new; // Ok.
- ^^^";
+ return #C6;
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.
- ^^^";
+ return #C7;
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.
- ^^^";
+ return #C8;
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.
- ^^^";
+ return #C2;
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.
- ^^^";
+ return #C5;
+static method test9() → (core::num) → self::A<core::num>
+ return #C10;
+static method test10() → (core::int) → self::A<core::int>
+ return #C11;
+static method test11() → (core::String) → self::A<dynamic>
+ return #C12;
+static method test12() → (core::num) → self::A<dynamic>
+ return #C10;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = instantiation self::A::foo <core::num>
+ #C3 = instantiation self::A::foo <core::int>
+ #C4 = constructor-tearoff self::A::•
+ #C5 = instantiation self::A::• <core::num>
+ #C6 = instantiation self::A::• <core::int>
+ #C7 = instantiation self::A::foo <core::String>
+ #C8 = instantiation self::A::• <core::String>
+ #C9 = static-tearoff self::A::bar
+ #C10 = instantiation self::A::bar <core::num>
+ #C11 = instantiation self::A::bar <core::int>
+ #C12 = instantiation self::A::bar <core::String>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.expect
index 33ffc2b..8f0ed57 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.expect
@@ -7,18 +7,12 @@
// 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:17: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) test6() => A.new; // 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:23:41: 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'.
@@ -38,27 +32,42 @@
return new self::A::•<self::A::bar::X>(x);
}
static method test1() → (core::num) → self::A<core::num>
- return self::A::foo<core::num>;
+ return #C2;
static method test2() → (core::int) → self::A<core::int>
- return self::A::foo<core::int>;
+ return #C3;
static method test3() → (core::num) → self::A<core::num>
- return self::A::•<core::num>;
+ return #C5;
static method test4() → (core::int) → self::A<core::int>
- return self::A::•<core::int>;
+ return #C6;
static method test5() → (core::String) → self::A<dynamic>
- return self::A::foo<core::String>;
+ return #C7;
static method test6() → (core::String) → self::A<dynamic>
- return self::A::•<core::String>;
+ return #C8;
static method test7() → (core::num) → self::A<dynamic>
- return self::A::foo<core::num>;
+ return #C2;
static method test8() → (core::num) → self::A<dynamic>
- return self::A::•<core::num>;
+ return #C5;
static method test9() → (core::num) → self::A<core::num>
- return self::A::bar<core::num>;
+ return #C10;
static method test10() → (core::int) → self::A<core::int>
- return self::A::bar<core::int>;
+ return #C11;
static method test11() → (core::String) → self::A<dynamic>
- return self::A::bar<core::String>;
+ return #C12;
static method test12() → (core::num) → self::A<dynamic>
- return self::A::bar<core::num>;
+ return #C10;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = instantiation self::A::foo <core::num*>
+ #C3 = instantiation self::A::foo <core::int*>
+ #C4 = constructor-tearoff self::A::•
+ #C5 = instantiation self::A::• <core::num*>
+ #C6 = instantiation self::A::• <core::int*>
+ #C7 = instantiation self::A::foo <core::String*>
+ #C8 = instantiation self::A::• <core::String*>
+ #C9 = static-tearoff self::A::bar
+ #C10 = instantiation self::A::bar <core::num*>
+ #C11 = instantiation self::A::bar <core::int*>
+ #C12 = instantiation self::A::bar <core::String*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.transformed.expect
index 3bcaa2b..8f0ed57 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.weak.transformed.expect
@@ -2,37 +2,23 @@
//
// 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.
-// ^^^
-//
-// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:13:35: Error: Getter not found: 'new'.
-// 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:16: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:16:42: Error: Getter not found: 'new'.
+// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:17: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) 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.
-// ^^^
+// pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:23:41: 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) test11() => A.bar; // Error.
+// ^
//
import self as self;
import "dart:core" as core;
@@ -42,37 +28,46 @@
: super core::Object::•() {}
constructor •(self::A::X x) → self::A<self::A::X>
: super core::Object::•() {}
+ static factory bar<X extends core::num>(self::A::bar::X x) → self::A<self::A::bar::X>
+ return new self::A::•<self::A::bar::X>(x);
}
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.
- ^^^";
+ return #C2;
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.
- ^^^";
+ return #C3;
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.
- ^^^";
+ return #C5;
static method test4() → (core::int) → self::A<core::int>
- return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/instantiation.dart:13:35: Error: Getter not found: 'new'.
-A<int> Function(int) test4() => A.new; // Ok.
- ^^^";
+ return #C6;
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.
- ^^^";
+ return #C7;
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.
- ^^^";
+ return #C8;
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.
- ^^^";
+ return #C2;
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.
- ^^^";
+ return #C5;
+static method test9() → (core::num) → self::A<core::num>
+ return #C10;
+static method test10() → (core::int) → self::A<core::int>
+ return #C11;
+static method test11() → (core::String) → self::A<dynamic>
+ return #C12;
+static method test12() → (core::num) → self::A<dynamic>
+ return #C10;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = instantiation self::A::foo <core::num*>
+ #C3 = instantiation self::A::foo <core::int*>
+ #C4 = constructor-tearoff self::A::•
+ #C5 = instantiation self::A::• <core::num*>
+ #C6 = instantiation self::A::• <core::int*>
+ #C7 = instantiation self::A::foo <core::String*>
+ #C8 = instantiation self::A::• <core::String*>
+ #C9 = static-tearoff self::A::bar
+ #C10 = instantiation self::A::bar <core::num*>
+ #C11 = instantiation self::A::bar <core::int*>
+ #C12 = instantiation self::A::bar <core::String*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.strong.expect
index ecc6126..2dac5ed 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.strong.expect
@@ -220,11 +220,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Class1::_#new#tearOff
- #C3 = tearoff self::Class2::_#named#tearOff
- #C4 = tearoff self::Class3::_#new#tearOff
- #C5 = tearoff self::Class4::_#new#tearOff
- #C6 = tearoff self::Class5::_#new#tearOff
- #C7 = tearoff self::Class6::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
+ #C3 = static-tearoff self::Class2::_#named#tearOff
+ #C4 = static-tearoff self::Class3::_#new#tearOff
+ #C5 = static-tearoff self::Class4::_#new#tearOff
+ #C6 = static-tearoff self::Class5::_#new#tearOff
+ #C7 = static-tearoff self::Class6::_#new#tearOff
#C8 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.strong.transformed.expect
index 49aa5ce..67d30a7 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.strong.transformed.expect
@@ -220,11 +220,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Class1::_#new#tearOff
- #C3 = tearoff self::Class2::_#named#tearOff
- #C4 = tearoff self::Class3::_#new#tearOff
- #C5 = tearoff self::Class4::_#new#tearOff
- #C6 = tearoff self::Class5::_#new#tearOff
- #C7 = tearoff self::Class6::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
+ #C3 = static-tearoff self::Class2::_#named#tearOff
+ #C4 = static-tearoff self::Class3::_#new#tearOff
+ #C5 = static-tearoff self::Class4::_#new#tearOff
+ #C6 = static-tearoff self::Class5::_#new#tearOff
+ #C7 = static-tearoff self::Class6::_#new#tearOff
#C8 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.expect
index ecc6126..2dac5ed 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.expect
@@ -220,11 +220,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Class1::_#new#tearOff
- #C3 = tearoff self::Class2::_#named#tearOff
- #C4 = tearoff self::Class3::_#new#tearOff
- #C5 = tearoff self::Class4::_#new#tearOff
- #C6 = tearoff self::Class5::_#new#tearOff
- #C7 = tearoff self::Class6::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
+ #C3 = static-tearoff self::Class2::_#named#tearOff
+ #C4 = static-tearoff self::Class3::_#new#tearOff
+ #C5 = static-tearoff self::Class4::_#new#tearOff
+ #C6 = static-tearoff self::Class5::_#new#tearOff
+ #C7 = static-tearoff self::Class6::_#new#tearOff
#C8 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.transformed.expect
index 49aa5ce..67d30a7 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off.dart.weak.transformed.expect
@@ -220,11 +220,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Class1::_#new#tearOff
- #C3 = tearoff self::Class2::_#named#tearOff
- #C4 = tearoff self::Class3::_#new#tearOff
- #C5 = tearoff self::Class4::_#new#tearOff
- #C6 = tearoff self::Class5::_#new#tearOff
- #C7 = tearoff self::Class6::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
+ #C3 = static-tearoff self::Class2::_#named#tearOff
+ #C4 = static-tearoff self::Class3::_#new#tearOff
+ #C5 = static-tearoff self::Class4::_#new#tearOff
+ #C6 = static-tearoff self::Class5::_#new#tearOff
+ #C7 = static-tearoff self::Class6::_#new#tearOff
#C8 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.strong.expect
index 9c7ebb5..b41e8e2 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.strong.expect
@@ -62,6 +62,6 @@
constants {
#C1 = 42
- #C2 = tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
#C3 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.strong.transformed.expect
index dfe46c0..ac558cd 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.strong.transformed.expect
@@ -62,6 +62,6 @@
constants {
#C1 = 42
- #C2 = tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
#C3 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.weak.expect
index 9c7ebb5..b41e8e2 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.weak.expect
@@ -62,6 +62,6 @@
constants {
#C1 = 42
- #C2 = tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
#C3 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.weak.transformed.expect
index dfe46c0..ac558cd 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_default_values.dart.weak.transformed.expect
@@ -62,6 +62,6 @@
constants {
#C1 = 42
- #C2 = tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
#C3 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.expect
index 7998cc3..007285e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.expect
@@ -27,5 +27,5 @@
}
constants {
- #C1 = tearoff self::Class::_#new#tearOff
+ #C1 = static-tearoff self::Class::_#new#tearOff
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.transformed.expect
index 7998cc3..007285e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.strong.transformed.expect
@@ -27,5 +27,5 @@
}
constants {
- #C1 = tearoff self::Class::_#new#tearOff
+ #C1 = static-tearoff self::Class::_#new#tearOff
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.expect
index 7998cc3..007285e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.expect
@@ -27,5 +27,5 @@
}
constants {
- #C1 = tearoff self::Class::_#new#tearOff
+ #C1 = static-tearoff self::Class::_#new#tearOff
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.transformed.expect
index 7998cc3..007285e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_tear_off_uri.dart.weak.transformed.expect
@@ -27,5 +27,5 @@
}
constants {
- #C1 = tearoff self::Class::_#new#tearOff
+ #C1 = static-tearoff self::Class::_#new#tearOff
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.strong.expect
index aa4165c..1411efa 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.strong.expect
@@ -244,11 +244,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Class1::_#new#tearOff
- #C3 = tearoff self::Class2::_#named#tearOff
- #C4 = tearoff self::Class3::_#new#tearOff
- #C5 = tearoff self::Class4::_#new#tearOff
- #C6 = tearoff self::Class5::_#new#tearOff
- #C7 = tearoff self::Class6::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
+ #C3 = static-tearoff self::Class2::_#named#tearOff
+ #C4 = static-tearoff self::Class3::_#new#tearOff
+ #C5 = static-tearoff self::Class4::_#new#tearOff
+ #C6 = static-tearoff self::Class5::_#new#tearOff
+ #C7 = static-tearoff self::Class6::_#new#tearOff
#C8 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.strong.transformed.expect
index 3a8fa1a..afcbd72 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.strong.transformed.expect
@@ -244,11 +244,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Class1::_#new#tearOff
- #C3 = tearoff self::Class2::_#named#tearOff
- #C4 = tearoff self::Class3::_#new#tearOff
- #C5 = tearoff self::Class4::_#new#tearOff
- #C6 = tearoff self::Class5::_#new#tearOff
- #C7 = tearoff self::Class6::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
+ #C3 = static-tearoff self::Class2::_#named#tearOff
+ #C4 = static-tearoff self::Class3::_#new#tearOff
+ #C5 = static-tearoff self::Class4::_#new#tearOff
+ #C6 = static-tearoff self::Class5::_#new#tearOff
+ #C7 = static-tearoff self::Class6::_#new#tearOff
#C8 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.expect
index aa4165c..1411efa 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.expect
@@ -244,11 +244,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Class1::_#new#tearOff
- #C3 = tearoff self::Class2::_#named#tearOff
- #C4 = tearoff self::Class3::_#new#tearOff
- #C5 = tearoff self::Class4::_#new#tearOff
- #C6 = tearoff self::Class5::_#new#tearOff
- #C7 = tearoff self::Class6::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
+ #C3 = static-tearoff self::Class2::_#named#tearOff
+ #C4 = static-tearoff self::Class3::_#new#tearOff
+ #C5 = static-tearoff self::Class4::_#new#tearOff
+ #C6 = static-tearoff self::Class5::_#new#tearOff
+ #C7 = static-tearoff self::Class6::_#new#tearOff
#C8 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.transformed.expect
index 3a8fa1a..afcbd72 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/factory_tear_off.dart.weak.transformed.expect
@@ -244,11 +244,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Class1::_#new#tearOff
- #C3 = tearoff self::Class2::_#named#tearOff
- #C4 = tearoff self::Class3::_#new#tearOff
- #C5 = tearoff self::Class4::_#new#tearOff
- #C6 = tearoff self::Class5::_#new#tearOff
- #C7 = tearoff self::Class6::_#new#tearOff
+ #C2 = static-tearoff self::Class1::_#new#tearOff
+ #C3 = static-tearoff self::Class2::_#named#tearOff
+ #C4 = static-tearoff self::Class3::_#new#tearOff
+ #C5 = static-tearoff self::Class4::_#new#tearOff
+ #C6 = static-tearoff self::Class5::_#new#tearOff
+ #C7 = static-tearoff self::Class6::_#new#tearOff
#C8 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.strong.expect
index d1c7116..5f219e3 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.strong.expect
@@ -184,10 +184,10 @@
}
constants {
- #C1 = tearoff mai::Class1::_#new#tearOff
- #C2 = tearoff mai::Class2::_#named#tearOff
- #C3 = tearoff mai::Class3::_#new#tearOff
- #C4 = tearoff mai::Class4::_#new#tearOff
- #C5 = tearoff mai::Class5::_#new#tearOff
+ #C1 = static-tearoff mai::Class1::_#new#tearOff
+ #C2 = static-tearoff mai::Class2::_#named#tearOff
+ #C3 = static-tearoff mai::Class3::_#new#tearOff
+ #C4 = static-tearoff mai::Class4::_#new#tearOff
+ #C5 = static-tearoff mai::Class5::_#new#tearOff
#C6 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.strong.transformed.expect
index f476c02..42623ded 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.strong.transformed.expect
@@ -184,10 +184,10 @@
}
constants {
- #C1 = tearoff mai::Class1::_#new#tearOff
- #C2 = tearoff mai::Class2::_#named#tearOff
- #C3 = tearoff mai::Class3::_#new#tearOff
- #C4 = tearoff mai::Class4::_#new#tearOff
- #C5 = tearoff mai::Class5::_#new#tearOff
+ #C1 = static-tearoff mai::Class1::_#new#tearOff
+ #C2 = static-tearoff mai::Class2::_#named#tearOff
+ #C3 = static-tearoff mai::Class3::_#new#tearOff
+ #C4 = static-tearoff mai::Class4::_#new#tearOff
+ #C5 = static-tearoff mai::Class5::_#new#tearOff
#C6 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.weak.expect
index d1c7116..5f219e3 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.weak.expect
@@ -184,10 +184,10 @@
}
constants {
- #C1 = tearoff mai::Class1::_#new#tearOff
- #C2 = tearoff mai::Class2::_#named#tearOff
- #C3 = tearoff mai::Class3::_#new#tearOff
- #C4 = tearoff mai::Class4::_#new#tearOff
- #C5 = tearoff mai::Class5::_#new#tearOff
+ #C1 = static-tearoff mai::Class1::_#new#tearOff
+ #C2 = static-tearoff mai::Class2::_#named#tearOff
+ #C3 = static-tearoff mai::Class3::_#new#tearOff
+ #C4 = static-tearoff mai::Class4::_#new#tearOff
+ #C5 = static-tearoff mai::Class5::_#new#tearOff
#C6 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.weak.transformed.expect
index f476c02..42623ded 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/from_dill/main.dart.weak.transformed.expect
@@ -184,10 +184,10 @@
}
constants {
- #C1 = tearoff mai::Class1::_#new#tearOff
- #C2 = tearoff mai::Class2::_#named#tearOff
- #C3 = tearoff mai::Class3::_#new#tearOff
- #C4 = tearoff mai::Class4::_#new#tearOff
- #C5 = tearoff mai::Class5::_#new#tearOff
+ #C1 = static-tearoff mai::Class1::_#new#tearOff
+ #C2 = static-tearoff mai::Class2::_#named#tearOff
+ #C3 = static-tearoff mai::Class3::_#new#tearOff
+ #C4 = static-tearoff mai::Class4::_#new#tearOff
+ #C5 = static-tearoff mai::Class5::_#new#tearOff
#C6 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.strong.expect
index d686ae7..1802229 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.strong.expect
@@ -172,9 +172,9 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
- #C3 = tearoff self::Class3::_#new#tearOff
- #C4 = tearoff self::Class4::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
+ #C3 = static-tearoff self::Class3::_#new#tearOff
+ #C4 = static-tearoff self::Class4::_#new#tearOff
#C5 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.strong.transformed.expect
index d58a81e..d13da4b 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.strong.transformed.expect
@@ -172,9 +172,9 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
- #C3 = tearoff self::Class3::_#new#tearOff
- #C4 = tearoff self::Class4::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
+ #C3 = static-tearoff self::Class3::_#new#tearOff
+ #C4 = static-tearoff self::Class4::_#new#tearOff
#C5 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.weak.expect
index d686ae7..1802229 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.weak.expect
@@ -172,9 +172,9 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
- #C3 = tearoff self::Class3::_#new#tearOff
- #C4 = tearoff self::Class4::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
+ #C3 = static-tearoff self::Class3::_#new#tearOff
+ #C4 = static-tearoff self::Class4::_#new#tearOff
#C5 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.weak.transformed.expect
index d58a81e..d13da4b 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_constructor_tear_off.dart.weak.transformed.expect
@@ -172,9 +172,9 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
- #C3 = tearoff self::Class3::_#new#tearOff
- #C4 = tearoff self::Class4::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
+ #C3 = static-tearoff self::Class3::_#new#tearOff
+ #C4 = static-tearoff self::Class4::_#new#tearOff
#C5 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.strong.expect
index 7dc5b5e..eae54df 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.strong.expect
@@ -192,9 +192,9 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
- #C3 = tearoff self::Class3::_#new#tearOff
- #C4 = tearoff self::Class4::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
+ #C3 = static-tearoff self::Class3::_#new#tearOff
+ #C4 = static-tearoff self::Class4::_#new#tearOff
#C5 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.strong.transformed.expect
index 867fcb1..552fe7e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.strong.transformed.expect
@@ -192,9 +192,9 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
- #C3 = tearoff self::Class3::_#new#tearOff
- #C4 = tearoff self::Class4::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
+ #C3 = static-tearoff self::Class3::_#new#tearOff
+ #C4 = static-tearoff self::Class4::_#new#tearOff
#C5 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.weak.expect
index 7dc5b5e..eae54df 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.weak.expect
@@ -192,9 +192,9 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
- #C3 = tearoff self::Class3::_#new#tearOff
- #C4 = tearoff self::Class4::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
+ #C3 = static-tearoff self::Class3::_#new#tearOff
+ #C4 = static-tearoff self::Class4::_#new#tearOff
#C5 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.weak.transformed.expect
index 867fcb1..552fe7e 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/generic_factory_tear_off.dart.weak.transformed.expect
@@ -192,9 +192,9 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
- #C3 = tearoff self::Class3::_#new#tearOff
- #C4 = tearoff self::Class4::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
+ #C3 = static-tearoff self::Class3::_#new#tearOff
+ #C4 = static-tearoff self::Class4::_#new#tearOff
#C5 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.strong.expect
index edd7977..f11dd53 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.strong.expect
@@ -89,7 +89,7 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
#C3 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.strong.transformed.expect
index 9297490..ff0482b 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.strong.transformed.expect
@@ -89,7 +89,7 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
#C3 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.weak.expect
index edd7977..f11dd53 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.weak.expect
@@ -89,7 +89,7 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
#C3 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.weak.transformed.expect
index 9297490..ff0482b 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.weak.transformed.expect
@@ -89,7 +89,7 @@
}
constants {
- #C1 = tearoff self::Class1::_#new#tearOff
- #C2 = tearoff self::Class2::_#new#tearOff
+ #C1 = static-tearoff self::Class1::_#new#tearOff
+ #C2 = static-tearoff self::Class2::_#new#tearOff
#C3 = false
}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart
new file mode 100644
index 0000000..0433631
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart
@@ -0,0 +1,186 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+final bool inSoundMode = <int?>[] is! List<int>;
+
+class A {}
+
+class B<X> {
+ int field1;
+ String field2;
+
+ B._(this.field1, this.field2);
+ B() : this._(0, '');
+ B.foo(this.field1) : field2 = '';
+ factory B.bar(int i, String j) => new B<X>._(i, j);
+}
+
+typedef DA1 = A;
+
+typedef DA2<X extends num> = A;
+
+typedef DB1 = B<String>;
+
+typedef DB2<X extends num> = B<X>;
+
+typedef DB3<X extends num, Y extends String> = B<X>;
+
+main() {
+ var f1a = DA1.new;
+ var c1a = f1a();
+ expect(true, c1a is A);
+ () {
+ f1a(0); // error
+ };
+
+ dynamic f1b = DA1.new;
+ var c1b = f1b();
+ expect(true, c1b is A);
+ throws(() => f1b(0));
+
+ var f2a = DA2.new;
+ var c2a = f2a();
+ expect(true, c2a is A);
+ () {
+ f2a(0); // error
+ f2a<String>(); // error
+ };
+
+ dynamic f2b = DA2.new;
+ var c2b = f2b();
+ expect(true, c2b is A);
+ var c2c = f2b<int>();
+ expect(true, c2c is A);
+ throws(() => f2b(0));
+ throws(() => f2b<String>());
+
+ var f3a = DB1.new;
+ var c3a = f3a();
+ expect(true, c3a is B<String>);
+ expect(false, c3a is B<int>);
+ expect(0, c3a.field1);
+ expect('', c3a.field2);
+ () {
+ f3a(0); // error
+ f3a<String>(); // error
+ };
+
+ dynamic f3b = DB1.new;
+ var c3b = f3b();
+ expect(true, c3b is B<String>);
+ expect(false, c3b is B<int>);
+ expect(0, c3a.field1);
+ expect('', c3a.field2);
+ throws(() => f3b(0));
+ throws(() => f3b<String>());
+
+ var f3c = DB1.foo;
+ var c3c = f3c(42);
+ expect(true, c3c is B<String>);
+ expect(false, c3c is B<int>);
+ expect(42, c3c.field1);
+ expect('', c3c.field2);
+ () {
+ f3c(); // error
+ f3c(0, 0); // error
+ f3c<String>(0); // error
+ };
+
+ dynamic f3d = DB1.foo;
+ var c3d = f3d(42);
+ expect(true, c3d is B<String>);
+ expect(false, c3d is B<int>);
+ expect(42, c3d.field1);
+ expect('', c3d.field2);
+ throws(() => f3d());
+ throws(() => f3d(0, 0));
+ throws(() => f3d<String>(0));
+
+ var f3e = DB1.bar;
+ var c3e = f3e(42, 'foo');
+ expect(true, c3e is B<String>);
+ expect(false, c3e is B<int>);
+ expect(42, c3e.field1);
+ expect('foo', c3e.field2);
+ () {
+ f3e(); // error
+ f3e(0); // error
+ f3e<String>(0, ''); // error
+ };
+
+ dynamic f3f = DB1.bar;
+ var c3f = f3f(42, 'foo');
+ expect(true, c3f is B<String>);
+ expect(false, c3f is B<int>);
+ expect(42, c3f.field1);
+ expect('foo', c3f.field2);
+ throws(() => c3f());
+ throws(() => c3f(0));
+ throws(() => c3f<String>(0));
+
+ var f4a = DB2.new;
+ var c4a = f4a();
+ expect(true, c4a is B<num>);
+ expect(false, c4a is B<int>);
+ var c4b = f4a<int>();
+ expect(true, c4b is B<int>);
+ expect(false, c4b is B<double>);
+ () {
+ f4a(0); // error
+ f4a<String>(); // error
+ };
+
+ dynamic f4b = DB2.new;
+ var c4c = f4b();
+ expect(true, c4c is B<num>);
+ expect(false, c4c is B<int>);
+ var c4d = f4b<int>();
+ expect(true, c4d is B<int>);
+ expect(false, c4d is B<double>);
+ throws(() => f4b(0));
+ throws(() => f4b<String>());
+
+ var f5a = DB3.new;
+ var c5a = f5a();
+ expect(true, c5a is B<num>);
+ expect(false, c5a is B<int>);
+ var c5b = f5a<int, String>();
+ expect(true, c5b is B<int>);
+ expect(false, c5b is B<double>);
+ () {
+ f5a(0); // error
+ f5a<String>(); // error
+ f5a<String, String>(); // error
+ f5a<num, num>(); // error
+ };
+
+ dynamic f5b = DB3.new;
+ var c5c = f5b();
+ expect(true, c5c is B<num>);
+ expect(false, c5c is B<int>);
+ var c5d = f5b<int, String>();
+ expect(true, c5d is B<int>);
+ expect(false, c5d is B<double>);
+ throws(() => f5b(0));
+ throws(() => f5b<String>());
+ throws(() => f5b<String, String>());
+ throws(() => f5b<num, num>());
+}
+
+expect(expected, actual) {
+ if (expected != actual) throw 'Expected $expected, actual $actual';
+}
+
+throws(Function() f, {bool inSoundModeOnly: false}) {
+ try {
+ f();
+ } catch (e) {
+ print('Thrown: $e');
+ return;
+ }
+ if (!inSoundMode && inSoundModeOnly) {
+ return;
+ }
+ throw 'Expected exception';
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.strong.expect
new file mode 100644
index 0000000..08a9470
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.strong.expect
@@ -0,0 +1,327 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:34:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f1a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:46:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f2a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:47:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f2a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:65:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f3a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:66:8: Error: Expected 0 type arguments.
+// f3a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:85:8: Error: Too few positional arguments: 1 required, 0 given.
+// f3c(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:86:8: Error: Too many positional arguments: 1 allowed, but 2 found.
+// Try removing the extra positional arguments.
+// f3c(0, 0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:87:8: Error: Expected 0 type arguments.
+// f3c<String>(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:107:8: Error: Too few positional arguments: 2 required, 0 given.
+// f3e(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:108:8: Error: Too few positional arguments: 2 required, 1 given.
+// f3e(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:109:8: Error: Expected 0 type arguments.
+// f3e<String>(0, ''); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:130:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f4a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:131:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f4a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:152:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f5a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:153:8: Error: Expected 2 type arguments.
+// f5a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:154:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f5a<String, String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:155:8: Error: Type argument 'num' doesn't conform to the bound 'String' of the type variable 'Y' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f5a<num, num>(); // error
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef DA1 = self::A;
+typedef DA2<unrelated X extends core::num> = self::A;
+typedef DB1 = self::B<core::String>;
+typedef DB2<X extends core::num> = self::B<X>;
+typedef DB3<X extends core::num, unrelated Y extends core::String> = self::B<X>;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff() → self::A
+ return new self::A::•();
+}
+class B<X extends core::Object? = dynamic> extends core::Object {
+ field core::int field1;
+ field core::String field2;
+ constructor _(core::int field1, core::String field2) → self::B<self::B::X%>
+ : self::B::field1 = field1, self::B::field2 = field2, super core::Object::•()
+ ;
+ constructor •() → self::B<self::B::X%>
+ : this self::B::_(0, "")
+ ;
+ constructor foo(core::int field1) → self::B<self::B::X%>
+ : self::B::field1 = field1, self::B::field2 = "", super core::Object::•()
+ ;
+ static method _#_#tearOff<X extends core::Object? = dynamic>(core::int field1, core::String field2) → self::B<self::B::_#_#tearOff::X%>
+ return new self::B::_<self::B::_#_#tearOff::X%>(field1, field2);
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::B<self::B::_#new#tearOff::X%>
+ return new self::B::•<self::B::_#new#tearOff::X%>();
+ static method _#foo#tearOff<X extends core::Object? = dynamic>(core::int field1) → self::B<self::B::_#foo#tearOff::X%>
+ return new self::B::foo<self::B::_#foo#tearOff::X%>(field1);
+ static factory bar<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::bar::X%>
+ return new self::B::_<self::B::bar::X%>(i, j);
+ static method _#bar#tearOff<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::_#bar#tearOff::X%>
+ return self::B::bar<self::B::_#bar#tearOff::X%>(i, j);
+}
+static final field core::bool inSoundMode = !(<core::int?>[] is{ForNonNullableByDefault} core::List<core::int>);
+static method main() → dynamic {
+ () → self::A f1a = #C1;
+ self::A c1a = f1a(){() → self::A};
+ self::expect(true, c1a is{ForNonNullableByDefault} self::A);
+ () → Null {
+ let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:34:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f1a(0); // error
+ ^" in f1a{<inapplicable>}.(0);
+ };
+ dynamic f1b = #C1;
+ dynamic c1b = f1b{dynamic}.call();
+ self::expect(true, c1b is{ForNonNullableByDefault} self::A);
+ self::throws(() → dynamic => f1b{dynamic}.call(0));
+ <unrelated X extends core::num>() → self::A f2a = #C2;
+ self::A c2a = f2a<core::num>(){() → self::A};
+ self::expect(true, c2a is{ForNonNullableByDefault} self::A);
+ () → Null {
+ let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:46:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f2a(0); // error
+ ^" in f2a{<inapplicable>}.<core::num>(0);
+ f2a<core::String>(){() → self::A};
+ };
+ dynamic f2b = #C3;
+ dynamic c2b = f2b{dynamic}.call();
+ self::expect(true, c2b is{ForNonNullableByDefault} self::A);
+ dynamic c2c = f2b{dynamic}.call<core::int>();
+ self::expect(true, c2c is{ForNonNullableByDefault} self::A);
+ self::throws(() → dynamic => f2b{dynamic}.call(0));
+ self::throws(() → dynamic => f2b{dynamic}.call<core::String>());
+ () → self::B<core::String> f3a = #C5;
+ self::B<core::String> c3a = f3a(){() → self::B<core::String>};
+ self::expect(true, c3a is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3a is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(0, c3a.{self::B::field1}{core::int});
+ self::expect("", c3a.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:65:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f3a(0); // error
+ ^" in f3a{<inapplicable>}.(0);
+ let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:66:8: Error: Expected 0 type arguments.
+ f3a<String>(); // error
+ ^" in f3a{<inapplicable>}.<core::String>();
+ };
+ dynamic f3b = #C5;
+ dynamic c3b = f3b{dynamic}.call();
+ self::expect(true, c3b is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(0, c3a.{self::B::field1}{core::int});
+ self::expect("", c3a.{self::B::field2}{core::String});
+ self::throws(() → dynamic => f3b{dynamic}.call(0));
+ self::throws(() → dynamic => f3b{dynamic}.call<core::String>());
+ (core::int) → self::B<core::String> f3c = #C7;
+ self::B<core::String> c3c = f3c(42){(core::int) → self::B<core::String>};
+ self::expect(true, c3c is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3c is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3c.{self::B::field1}{core::int});
+ self::expect("", c3c.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:85:8: Error: Too few positional arguments: 1 required, 0 given.
+ f3c(); // error
+ ^" in f3c{<inapplicable>}.();
+ let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:86:8: Error: Too many positional arguments: 1 allowed, but 2 found.
+Try removing the extra positional arguments.
+ f3c(0, 0); // error
+ ^" in f3c{<inapplicable>}.(0, 0);
+ let final Never #t7 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:87:8: Error: Expected 0 type arguments.
+ f3c<String>(0); // error
+ ^" in f3c{<inapplicable>}.<core::String>(0);
+ };
+ dynamic f3d = #C7;
+ dynamic c3d = f3d{dynamic}.call(42);
+ self::expect(true, c3d is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3d{dynamic}.field1);
+ self::expect("", c3d{dynamic}.field2);
+ self::throws(() → dynamic => f3d{dynamic}.call());
+ self::throws(() → dynamic => f3d{dynamic}.call(0, 0));
+ self::throws(() → dynamic => f3d{dynamic}.call<core::String>(0));
+ (core::int, core::String) → self::B<core::String> f3e = #C9;
+ self::B<core::String> c3e = f3e(42, "foo"){(core::int, core::String) → self::B<core::String>};
+ self::expect(true, c3e is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3e is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3e.{self::B::field1}{core::int});
+ self::expect("foo", c3e.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t8 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:107:8: Error: Too few positional arguments: 2 required, 0 given.
+ f3e(); // error
+ ^" in f3e{<inapplicable>}.();
+ let final Never #t9 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:108:8: Error: Too few positional arguments: 2 required, 1 given.
+ f3e(0); // error
+ ^" in f3e{<inapplicable>}.(0);
+ let final Never #t10 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:109:8: Error: Expected 0 type arguments.
+ f3e<String>(0, ''); // error
+ ^" in f3e{<inapplicable>}.<core::String>(0, "");
+ };
+ dynamic f3f = #C9;
+ dynamic c3f = f3f{dynamic}.call(42, "foo");
+ self::expect(true, c3f is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3f is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3f{dynamic}.field1);
+ self::expect("foo", c3f{dynamic}.field2);
+ self::throws(() → dynamic => c3f{dynamic}.call());
+ self::throws(() → dynamic => c3f{dynamic}.call(0));
+ self::throws(() → dynamic => c3f{dynamic}.call<core::String>(0));
+ <X extends core::num>() → self::B<X> f4a = #C10;
+ self::B<core::num> c4a = f4a<core::num>(){() → self::B<core::num>};
+ self::expect(true, c4a is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c4a is{ForNonNullableByDefault} self::B<core::int>);
+ self::B<core::int> c4b = f4a<core::int>(){() → self::B<core::int>};
+ self::expect(true, c4b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c4b is{ForNonNullableByDefault} self::B<core::double>);
+ () → Null {
+ let final Never #t11 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:130:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f4a(0); // error
+ ^" in f4a{<inapplicable>}.<core::num>(0);
+ f4a<core::String>(){() → self::B<core::String>};
+ };
+ dynamic f4b = #C11;
+ dynamic c4c = f4b{dynamic}.call();
+ self::expect(true, c4c is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c4c is{ForNonNullableByDefault} self::B<core::int>);
+ dynamic c4d = f4b{dynamic}.call<core::int>();
+ self::expect(true, c4d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c4d is{ForNonNullableByDefault} self::B<core::double>);
+ self::throws(() → dynamic => f4b{dynamic}.call(0));
+ self::throws(() → dynamic => f4b{dynamic}.call<core::String>());
+ <X extends core::num, unrelated Y extends core::String>() → self::B<X> f5a = #C12;
+ self::B<core::num> c5a = f5a<core::num, core::String>(){() → self::B<core::num>};
+ self::expect(true, c5a is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c5a is{ForNonNullableByDefault} self::B<core::int>);
+ self::B<core::int> c5b = f5a<core::int, core::String>(){() → self::B<core::int>};
+ self::expect(true, c5b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c5b is{ForNonNullableByDefault} self::B<core::double>);
+ () → Null {
+ let final Never #t12 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:152:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f5a(0); // error
+ ^" in f5a{<inapplicable>}.<core::num, core::String>(0);
+ let final Never #t13 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:153:8: Error: Expected 2 type arguments.
+ f5a<String>(); // error
+ ^" in f5a{<inapplicable>}.<core::String>();
+ f5a<core::String, core::String>(){() → self::B<core::String>};
+ f5a<core::num, core::num>(){() → self::B<core::num>};
+ };
+ dynamic f5b = #C13;
+ dynamic c5c = f5b{dynamic}.call();
+ self::expect(true, c5c is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c5c is{ForNonNullableByDefault} self::B<core::int>);
+ dynamic c5d = f5b{dynamic}.call<core::int, core::String>();
+ self::expect(true, c5d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c5d is{ForNonNullableByDefault} self::B<core::double>);
+ self::throws(() → dynamic => f5b{dynamic}.call(0));
+ self::throws(() → dynamic => f5b{dynamic}.call<core::String>());
+ self::throws(() → dynamic => f5b{dynamic}.call<core::String, core::String>());
+ self::throws(() → dynamic => f5b{dynamic}.call<core::num, core::num>());
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+static method throws(() → dynamic f, {core::bool inSoundModeOnly = #C14}) → dynamic {
+ try {
+ f(){() → dynamic};
+ }
+ on core::Object catch(final core::Object e) {
+ core::print("Thrown: ${e}");
+ return;
+ }
+ if(!self::inSoundMode && inSoundModeOnly) {
+ return;
+ }
+ throw "Expected exception";
+}
+static method _#0#tearOff<unrelated X extends core::num>() → self::A
+ return (#C1)(){() → self::A};
+static method _#1#tearOff<unrelated X extends core::num>() → self::A
+ return (#C1)(){() → self::A};
+static method _#2#tearOff<X extends core::num>() → self::B<self::_#2#tearOff::X>
+ return (#C4)<self::_#2#tearOff::X>(){() → self::B<self::_#2#tearOff::X>};
+static method _#3#tearOff<X extends core::num>() → self::B<self::_#3#tearOff::X>
+ return (#C4)<self::_#3#tearOff::X>(){() → self::B<self::_#3#tearOff::X>};
+static method _#4#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#4#tearOff::X>
+ return (#C4)<self::_#4#tearOff::X>(){() → self::B<self::_#4#tearOff::X>};
+static method _#5#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#5#tearOff::X>
+ return (#C4)<self::_#5#tearOff::X>(){() → self::B<self::_#5#tearOff::X>};
+
+constants {
+ #C1 = static-tearoff self::A::_#new#tearOff
+ #C2 = static-tearoff self::_#0#tearOff
+ #C3 = static-tearoff self::_#1#tearOff
+ #C4 = static-tearoff self::B::_#new#tearOff
+ #C5 = instantiation self::B::_#new#tearOff <core::String>
+ #C6 = static-tearoff self::B::_#foo#tearOff
+ #C7 = instantiation self::B::_#foo#tearOff <core::String>
+ #C8 = static-tearoff self::B::_#bar#tearOff
+ #C9 = instantiation self::B::_#bar#tearOff <core::String>
+ #C10 = static-tearoff self::_#2#tearOff
+ #C11 = static-tearoff self::_#3#tearOff
+ #C12 = static-tearoff self::_#4#tearOff
+ #C13 = static-tearoff self::_#5#tearOff
+ #C14 = false
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.strong.transformed.expect
new file mode 100644
index 0000000..151872a
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.strong.transformed.expect
@@ -0,0 +1,327 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:34:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f1a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:46:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f2a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:47:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f2a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:65:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f3a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:66:8: Error: Expected 0 type arguments.
+// f3a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:85:8: Error: Too few positional arguments: 1 required, 0 given.
+// f3c(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:86:8: Error: Too many positional arguments: 1 allowed, but 2 found.
+// Try removing the extra positional arguments.
+// f3c(0, 0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:87:8: Error: Expected 0 type arguments.
+// f3c<String>(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:107:8: Error: Too few positional arguments: 2 required, 0 given.
+// f3e(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:108:8: Error: Too few positional arguments: 2 required, 1 given.
+// f3e(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:109:8: Error: Expected 0 type arguments.
+// f3e<String>(0, ''); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:130:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f4a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:131:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f4a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:152:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f5a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:153:8: Error: Expected 2 type arguments.
+// f5a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:154:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f5a<String, String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:155:8: Error: Type argument 'num' doesn't conform to the bound 'String' of the type variable 'Y' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f5a<num, num>(); // error
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef DA1 = self::A;
+typedef DA2<unrelated X extends core::num> = self::A;
+typedef DB1 = self::B<core::String>;
+typedef DB2<X extends core::num> = self::B<X>;
+typedef DB3<X extends core::num, unrelated Y extends core::String> = self::B<X>;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff() → self::A
+ return new self::A::•();
+}
+class B<X extends core::Object? = dynamic> extends core::Object {
+ field core::int field1;
+ field core::String field2;
+ constructor _(core::int field1, core::String field2) → self::B<self::B::X%>
+ : self::B::field1 = field1, self::B::field2 = field2, super core::Object::•()
+ ;
+ constructor •() → self::B<self::B::X%>
+ : this self::B::_(0, "")
+ ;
+ constructor foo(core::int field1) → self::B<self::B::X%>
+ : self::B::field1 = field1, self::B::field2 = "", super core::Object::•()
+ ;
+ static method _#_#tearOff<X extends core::Object? = dynamic>(core::int field1, core::String field2) → self::B<self::B::_#_#tearOff::X%>
+ return new self::B::_<self::B::_#_#tearOff::X%>(field1, field2);
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::B<self::B::_#new#tearOff::X%>
+ return new self::B::•<self::B::_#new#tearOff::X%>();
+ static method _#foo#tearOff<X extends core::Object? = dynamic>(core::int field1) → self::B<self::B::_#foo#tearOff::X%>
+ return new self::B::foo<self::B::_#foo#tearOff::X%>(field1);
+ static factory bar<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::bar::X%>
+ return new self::B::_<self::B::bar::X%>(i, j);
+ static method _#bar#tearOff<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::_#bar#tearOff::X%>
+ return self::B::bar<self::B::_#bar#tearOff::X%>(i, j);
+}
+static final field core::bool inSoundMode = !(core::_GrowableList::•<core::int?>(0) is{ForNonNullableByDefault} core::List<core::int>);
+static method main() → dynamic {
+ () → self::A f1a = #C1;
+ self::A c1a = f1a(){() → self::A};
+ self::expect(true, c1a is{ForNonNullableByDefault} self::A);
+ () → Null {
+ let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:34:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f1a(0); // error
+ ^" in f1a{<inapplicable>}.(0);
+ };
+ dynamic f1b = #C1;
+ dynamic c1b = f1b{dynamic}.call();
+ self::expect(true, c1b is{ForNonNullableByDefault} self::A);
+ self::throws(() → dynamic => f1b{dynamic}.call(0));
+ <unrelated X extends core::num>() → self::A f2a = #C2;
+ self::A c2a = f2a<core::num>(){() → self::A};
+ self::expect(true, c2a is{ForNonNullableByDefault} self::A);
+ () → Null {
+ let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:46:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f2a(0); // error
+ ^" in f2a{<inapplicable>}.<core::num>(0);
+ f2a<core::String>(){() → self::A};
+ };
+ dynamic f2b = #C3;
+ dynamic c2b = f2b{dynamic}.call();
+ self::expect(true, c2b is{ForNonNullableByDefault} self::A);
+ dynamic c2c = f2b{dynamic}.call<core::int>();
+ self::expect(true, c2c is{ForNonNullableByDefault} self::A);
+ self::throws(() → dynamic => f2b{dynamic}.call(0));
+ self::throws(() → dynamic => f2b{dynamic}.call<core::String>());
+ () → self::B<core::String> f3a = #C5;
+ self::B<core::String> c3a = f3a(){() → self::B<core::String>};
+ self::expect(true, c3a is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3a is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(0, c3a.{self::B::field1}{core::int});
+ self::expect("", c3a.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:65:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f3a(0); // error
+ ^" in f3a{<inapplicable>}.(0);
+ let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:66:8: Error: Expected 0 type arguments.
+ f3a<String>(); // error
+ ^" in f3a{<inapplicable>}.<core::String>();
+ };
+ dynamic f3b = #C5;
+ dynamic c3b = f3b{dynamic}.call();
+ self::expect(true, c3b is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(0, c3a.{self::B::field1}{core::int});
+ self::expect("", c3a.{self::B::field2}{core::String});
+ self::throws(() → dynamic => f3b{dynamic}.call(0));
+ self::throws(() → dynamic => f3b{dynamic}.call<core::String>());
+ (core::int) → self::B<core::String> f3c = #C7;
+ self::B<core::String> c3c = f3c(42){(core::int) → self::B<core::String>};
+ self::expect(true, c3c is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3c is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3c.{self::B::field1}{core::int});
+ self::expect("", c3c.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:85:8: Error: Too few positional arguments: 1 required, 0 given.
+ f3c(); // error
+ ^" in f3c{<inapplicable>}.();
+ let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:86:8: Error: Too many positional arguments: 1 allowed, but 2 found.
+Try removing the extra positional arguments.
+ f3c(0, 0); // error
+ ^" in f3c{<inapplicable>}.(0, 0);
+ let final Never #t7 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:87:8: Error: Expected 0 type arguments.
+ f3c<String>(0); // error
+ ^" in f3c{<inapplicable>}.<core::String>(0);
+ };
+ dynamic f3d = #C7;
+ dynamic c3d = f3d{dynamic}.call(42);
+ self::expect(true, c3d is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3d{dynamic}.field1);
+ self::expect("", c3d{dynamic}.field2);
+ self::throws(() → dynamic => f3d{dynamic}.call());
+ self::throws(() → dynamic => f3d{dynamic}.call(0, 0));
+ self::throws(() → dynamic => f3d{dynamic}.call<core::String>(0));
+ (core::int, core::String) → self::B<core::String> f3e = #C9;
+ self::B<core::String> c3e = f3e(42, "foo"){(core::int, core::String) → self::B<core::String>};
+ self::expect(true, c3e is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3e is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3e.{self::B::field1}{core::int});
+ self::expect("foo", c3e.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t8 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:107:8: Error: Too few positional arguments: 2 required, 0 given.
+ f3e(); // error
+ ^" in f3e{<inapplicable>}.();
+ let final Never #t9 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:108:8: Error: Too few positional arguments: 2 required, 1 given.
+ f3e(0); // error
+ ^" in f3e{<inapplicable>}.(0);
+ let final Never #t10 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:109:8: Error: Expected 0 type arguments.
+ f3e<String>(0, ''); // error
+ ^" in f3e{<inapplicable>}.<core::String>(0, "");
+ };
+ dynamic f3f = #C9;
+ dynamic c3f = f3f{dynamic}.call(42, "foo");
+ self::expect(true, c3f is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3f is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3f{dynamic}.field1);
+ self::expect("foo", c3f{dynamic}.field2);
+ self::throws(() → dynamic => c3f{dynamic}.call());
+ self::throws(() → dynamic => c3f{dynamic}.call(0));
+ self::throws(() → dynamic => c3f{dynamic}.call<core::String>(0));
+ <X extends core::num>() → self::B<X> f4a = #C10;
+ self::B<core::num> c4a = f4a<core::num>(){() → self::B<core::num>};
+ self::expect(true, c4a is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c4a is{ForNonNullableByDefault} self::B<core::int>);
+ self::B<core::int> c4b = f4a<core::int>(){() → self::B<core::int>};
+ self::expect(true, c4b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c4b is{ForNonNullableByDefault} self::B<core::double>);
+ () → Null {
+ let final Never #t11 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:130:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f4a(0); // error
+ ^" in f4a{<inapplicable>}.<core::num>(0);
+ f4a<core::String>(){() → self::B<core::String>};
+ };
+ dynamic f4b = #C11;
+ dynamic c4c = f4b{dynamic}.call();
+ self::expect(true, c4c is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c4c is{ForNonNullableByDefault} self::B<core::int>);
+ dynamic c4d = f4b{dynamic}.call<core::int>();
+ self::expect(true, c4d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c4d is{ForNonNullableByDefault} self::B<core::double>);
+ self::throws(() → dynamic => f4b{dynamic}.call(0));
+ self::throws(() → dynamic => f4b{dynamic}.call<core::String>());
+ <X extends core::num, unrelated Y extends core::String>() → self::B<X> f5a = #C12;
+ self::B<core::num> c5a = f5a<core::num, core::String>(){() → self::B<core::num>};
+ self::expect(true, c5a is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c5a is{ForNonNullableByDefault} self::B<core::int>);
+ self::B<core::int> c5b = f5a<core::int, core::String>(){() → self::B<core::int>};
+ self::expect(true, c5b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c5b is{ForNonNullableByDefault} self::B<core::double>);
+ () → Null {
+ let final Never #t12 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:152:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f5a(0); // error
+ ^" in f5a{<inapplicable>}.<core::num, core::String>(0);
+ let final Never #t13 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:153:8: Error: Expected 2 type arguments.
+ f5a<String>(); // error
+ ^" in f5a{<inapplicable>}.<core::String>();
+ f5a<core::String, core::String>(){() → self::B<core::String>};
+ f5a<core::num, core::num>(){() → self::B<core::num>};
+ };
+ dynamic f5b = #C13;
+ dynamic c5c = f5b{dynamic}.call();
+ self::expect(true, c5c is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c5c is{ForNonNullableByDefault} self::B<core::int>);
+ dynamic c5d = f5b{dynamic}.call<core::int, core::String>();
+ self::expect(true, c5d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c5d is{ForNonNullableByDefault} self::B<core::double>);
+ self::throws(() → dynamic => f5b{dynamic}.call(0));
+ self::throws(() → dynamic => f5b{dynamic}.call<core::String>());
+ self::throws(() → dynamic => f5b{dynamic}.call<core::String, core::String>());
+ self::throws(() → dynamic => f5b{dynamic}.call<core::num, core::num>());
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+static method throws(() → dynamic f, {core::bool inSoundModeOnly = #C14}) → dynamic {
+ try {
+ f(){() → dynamic};
+ }
+ on core::Object catch(final core::Object e) {
+ core::print("Thrown: ${e}");
+ return;
+ }
+ if(!self::inSoundMode && inSoundModeOnly) {
+ return;
+ }
+ throw "Expected exception";
+}
+static method _#0#tearOff<unrelated X extends core::num>() → self::A
+ return (#C1)(){() → self::A};
+static method _#1#tearOff<unrelated X extends core::num>() → self::A
+ return (#C1)(){() → self::A};
+static method _#2#tearOff<X extends core::num>() → self::B<self::_#2#tearOff::X>
+ return (#C4)<self::_#2#tearOff::X>(){() → self::B<self::_#2#tearOff::X>};
+static method _#3#tearOff<X extends core::num>() → self::B<self::_#3#tearOff::X>
+ return (#C4)<self::_#3#tearOff::X>(){() → self::B<self::_#3#tearOff::X>};
+static method _#4#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#4#tearOff::X>
+ return (#C4)<self::_#4#tearOff::X>(){() → self::B<self::_#4#tearOff::X>};
+static method _#5#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#5#tearOff::X>
+ return (#C4)<self::_#5#tearOff::X>(){() → self::B<self::_#5#tearOff::X>};
+
+constants {
+ #C1 = static-tearoff self::A::_#new#tearOff
+ #C2 = static-tearoff self::_#0#tearOff
+ #C3 = static-tearoff self::_#1#tearOff
+ #C4 = static-tearoff self::B::_#new#tearOff
+ #C5 = instantiation self::B::_#new#tearOff <core::String>
+ #C6 = static-tearoff self::B::_#foo#tearOff
+ #C7 = instantiation self::B::_#foo#tearOff <core::String>
+ #C8 = static-tearoff self::B::_#bar#tearOff
+ #C9 = instantiation self::B::_#bar#tearOff <core::String>
+ #C10 = static-tearoff self::_#2#tearOff
+ #C11 = static-tearoff self::_#3#tearOff
+ #C12 = static-tearoff self::_#4#tearOff
+ #C13 = static-tearoff self::_#5#tearOff
+ #C14 = false
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.textual_outline.expect
new file mode 100644
index 0000000..fa1b6a2
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.textual_outline.expect
@@ -0,0 +1,21 @@
+final bool inSoundMode = <int?>[] is! List<int>;
+
+class A {}
+
+class B<X> {
+ int field1;
+ String field2;
+ B._(this.field1, this.field2);
+ B() : this._(0, '');
+ B.foo(this.field1) : field2 = '';
+ factory B.bar(int i, String j) => new B<X>._(i, j);
+}
+
+typedef DA1 = A;
+typedef DA2<X extends num> = A;
+typedef DB1 = B<String>;
+typedef DB2<X extends num> = B<X>;
+typedef DB3<X extends num, Y extends String> = B<X>;
+main() {}
+expect(expected, actual) {}
+throws(Function() f, {bool inSoundModeOnly: false}) {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..f65e858
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.textual_outline_modelled.expect
@@ -0,0 +1,20 @@
+class A {}
+
+class B<X> {
+ B() : this._(0, '');
+ B._(this.field1, this.field2);
+ B.foo(this.field1) : field2 = '';
+ String field2;
+ factory B.bar(int i, String j) => new B<X>._(i, j);
+ int field1;
+}
+
+expect(expected, actual) {}
+final bool inSoundMode = <int?>[] is! List<int>;
+main() {}
+throws(Function() f, {bool inSoundModeOnly: false}) {}
+typedef DA1 = A;
+typedef DA2<X extends num> = A;
+typedef DB1 = B<String>;
+typedef DB2<X extends num> = B<X>;
+typedef DB3<X extends num, Y extends String> = B<X>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.weak.expect
new file mode 100644
index 0000000..630a7de
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.weak.expect
@@ -0,0 +1,327 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:34:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f1a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:46:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f2a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:47:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f2a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:65:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f3a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:66:8: Error: Expected 0 type arguments.
+// f3a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:85:8: Error: Too few positional arguments: 1 required, 0 given.
+// f3c(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:86:8: Error: Too many positional arguments: 1 allowed, but 2 found.
+// Try removing the extra positional arguments.
+// f3c(0, 0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:87:8: Error: Expected 0 type arguments.
+// f3c<String>(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:107:8: Error: Too few positional arguments: 2 required, 0 given.
+// f3e(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:108:8: Error: Too few positional arguments: 2 required, 1 given.
+// f3e(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:109:8: Error: Expected 0 type arguments.
+// f3e<String>(0, ''); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:130:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f4a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:131:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f4a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:152:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f5a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:153:8: Error: Expected 2 type arguments.
+// f5a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:154:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f5a<String, String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:155:8: Error: Type argument 'num' doesn't conform to the bound 'String' of the type variable 'Y' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f5a<num, num>(); // error
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef DA1 = self::A;
+typedef DA2<unrelated X extends core::num> = self::A;
+typedef DB1 = self::B<core::String>;
+typedef DB2<X extends core::num> = self::B<X>;
+typedef DB3<X extends core::num, unrelated Y extends core::String> = self::B<X>;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff() → self::A
+ return new self::A::•();
+}
+class B<X extends core::Object? = dynamic> extends core::Object {
+ field core::int field1;
+ field core::String field2;
+ constructor _(core::int field1, core::String field2) → self::B<self::B::X%>
+ : self::B::field1 = field1, self::B::field2 = field2, super core::Object::•()
+ ;
+ constructor •() → self::B<self::B::X%>
+ : this self::B::_(0, "")
+ ;
+ constructor foo(core::int field1) → self::B<self::B::X%>
+ : self::B::field1 = field1, self::B::field2 = "", super core::Object::•()
+ ;
+ static method _#_#tearOff<X extends core::Object? = dynamic>(core::int field1, core::String field2) → self::B<self::B::_#_#tearOff::X%>
+ return new self::B::_<self::B::_#_#tearOff::X%>(field1, field2);
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::B<self::B::_#new#tearOff::X%>
+ return new self::B::•<self::B::_#new#tearOff::X%>();
+ static method _#foo#tearOff<X extends core::Object? = dynamic>(core::int field1) → self::B<self::B::_#foo#tearOff::X%>
+ return new self::B::foo<self::B::_#foo#tearOff::X%>(field1);
+ static factory bar<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::bar::X%>
+ return new self::B::_<self::B::bar::X%>(i, j);
+ static method _#bar#tearOff<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::_#bar#tearOff::X%>
+ return self::B::bar<self::B::_#bar#tearOff::X%>(i, j);
+}
+static final field core::bool inSoundMode = !(<core::int?>[] is{ForNonNullableByDefault} core::List<core::int>);
+static method main() → dynamic {
+ () → self::A f1a = #C1;
+ self::A c1a = f1a(){() → self::A};
+ self::expect(true, c1a is{ForNonNullableByDefault} self::A);
+ () → Null {
+ let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:34:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f1a(0); // error
+ ^" in f1a{<inapplicable>}.(0);
+ };
+ dynamic f1b = #C1;
+ dynamic c1b = f1b{dynamic}.call();
+ self::expect(true, c1b is{ForNonNullableByDefault} self::A);
+ self::throws(() → dynamic => f1b{dynamic}.call(0));
+ <unrelated X extends core::num>() → self::A f2a = #C2;
+ self::A c2a = f2a<core::num>(){() → self::A};
+ self::expect(true, c2a is{ForNonNullableByDefault} self::A);
+ () → Null {
+ let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:46:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f2a(0); // error
+ ^" in f2a{<inapplicable>}.<core::num>(0);
+ f2a<core::String>(){() → self::A};
+ };
+ dynamic f2b = #C3;
+ dynamic c2b = f2b{dynamic}.call();
+ self::expect(true, c2b is{ForNonNullableByDefault} self::A);
+ dynamic c2c = f2b{dynamic}.call<core::int>();
+ self::expect(true, c2c is{ForNonNullableByDefault} self::A);
+ self::throws(() → dynamic => f2b{dynamic}.call(0));
+ self::throws(() → dynamic => f2b{dynamic}.call<core::String>());
+ () → self::B<core::String> f3a = #C5;
+ self::B<core::String> c3a = f3a(){() → self::B<core::String>};
+ self::expect(true, c3a is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3a is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(0, c3a.{self::B::field1}{core::int});
+ self::expect("", c3a.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:65:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f3a(0); // error
+ ^" in f3a{<inapplicable>}.(0);
+ let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:66:8: Error: Expected 0 type arguments.
+ f3a<String>(); // error
+ ^" in f3a{<inapplicable>}.<core::String>();
+ };
+ dynamic f3b = #C5;
+ dynamic c3b = f3b{dynamic}.call();
+ self::expect(true, c3b is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(0, c3a.{self::B::field1}{core::int});
+ self::expect("", c3a.{self::B::field2}{core::String});
+ self::throws(() → dynamic => f3b{dynamic}.call(0));
+ self::throws(() → dynamic => f3b{dynamic}.call<core::String>());
+ (core::int) → self::B<core::String> f3c = #C7;
+ self::B<core::String> c3c = f3c(42){(core::int) → self::B<core::String>};
+ self::expect(true, c3c is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3c is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3c.{self::B::field1}{core::int});
+ self::expect("", c3c.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:85:8: Error: Too few positional arguments: 1 required, 0 given.
+ f3c(); // error
+ ^" in f3c{<inapplicable>}.();
+ let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:86:8: Error: Too many positional arguments: 1 allowed, but 2 found.
+Try removing the extra positional arguments.
+ f3c(0, 0); // error
+ ^" in f3c{<inapplicable>}.(0, 0);
+ let final Never #t7 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:87:8: Error: Expected 0 type arguments.
+ f3c<String>(0); // error
+ ^" in f3c{<inapplicable>}.<core::String>(0);
+ };
+ dynamic f3d = #C7;
+ dynamic c3d = f3d{dynamic}.call(42);
+ self::expect(true, c3d is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3d{dynamic}.field1);
+ self::expect("", c3d{dynamic}.field2);
+ self::throws(() → dynamic => f3d{dynamic}.call());
+ self::throws(() → dynamic => f3d{dynamic}.call(0, 0));
+ self::throws(() → dynamic => f3d{dynamic}.call<core::String>(0));
+ (core::int, core::String) → self::B<core::String> f3e = #C9;
+ self::B<core::String> c3e = f3e(42, "foo"){(core::int, core::String) → self::B<core::String>};
+ self::expect(true, c3e is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3e is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3e.{self::B::field1}{core::int});
+ self::expect("foo", c3e.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t8 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:107:8: Error: Too few positional arguments: 2 required, 0 given.
+ f3e(); // error
+ ^" in f3e{<inapplicable>}.();
+ let final Never #t9 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:108:8: Error: Too few positional arguments: 2 required, 1 given.
+ f3e(0); // error
+ ^" in f3e{<inapplicable>}.(0);
+ let final Never #t10 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:109:8: Error: Expected 0 type arguments.
+ f3e<String>(0, ''); // error
+ ^" in f3e{<inapplicable>}.<core::String>(0, "");
+ };
+ dynamic f3f = #C9;
+ dynamic c3f = f3f{dynamic}.call(42, "foo");
+ self::expect(true, c3f is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3f is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3f{dynamic}.field1);
+ self::expect("foo", c3f{dynamic}.field2);
+ self::throws(() → dynamic => c3f{dynamic}.call());
+ self::throws(() → dynamic => c3f{dynamic}.call(0));
+ self::throws(() → dynamic => c3f{dynamic}.call<core::String>(0));
+ <X extends core::num>() → self::B<X> f4a = #C10;
+ self::B<core::num> c4a = f4a<core::num>(){() → self::B<core::num>};
+ self::expect(true, c4a is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c4a is{ForNonNullableByDefault} self::B<core::int>);
+ self::B<core::int> c4b = f4a<core::int>(){() → self::B<core::int>};
+ self::expect(true, c4b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c4b is{ForNonNullableByDefault} self::B<core::double>);
+ () → Null {
+ let final Never #t11 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:130:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f4a(0); // error
+ ^" in f4a{<inapplicable>}.<core::num>(0);
+ f4a<core::String>(){() → self::B<core::String>};
+ };
+ dynamic f4b = #C11;
+ dynamic c4c = f4b{dynamic}.call();
+ self::expect(true, c4c is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c4c is{ForNonNullableByDefault} self::B<core::int>);
+ dynamic c4d = f4b{dynamic}.call<core::int>();
+ self::expect(true, c4d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c4d is{ForNonNullableByDefault} self::B<core::double>);
+ self::throws(() → dynamic => f4b{dynamic}.call(0));
+ self::throws(() → dynamic => f4b{dynamic}.call<core::String>());
+ <X extends core::num, unrelated Y extends core::String>() → self::B<X> f5a = #C12;
+ self::B<core::num> c5a = f5a<core::num, core::String>(){() → self::B<core::num>};
+ self::expect(true, c5a is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c5a is{ForNonNullableByDefault} self::B<core::int>);
+ self::B<core::int> c5b = f5a<core::int, core::String>(){() → self::B<core::int>};
+ self::expect(true, c5b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c5b is{ForNonNullableByDefault} self::B<core::double>);
+ () → Null {
+ let final Never #t12 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:152:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f5a(0); // error
+ ^" in f5a{<inapplicable>}.<core::num, core::String>(0);
+ let final Never #t13 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:153:8: Error: Expected 2 type arguments.
+ f5a<String>(); // error
+ ^" in f5a{<inapplicable>}.<core::String>();
+ f5a<core::String, core::String>(){() → self::B<core::String>};
+ f5a<core::num, core::num>(){() → self::B<core::num>};
+ };
+ dynamic f5b = #C13;
+ dynamic c5c = f5b{dynamic}.call();
+ self::expect(true, c5c is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c5c is{ForNonNullableByDefault} self::B<core::int>);
+ dynamic c5d = f5b{dynamic}.call<core::int, core::String>();
+ self::expect(true, c5d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c5d is{ForNonNullableByDefault} self::B<core::double>);
+ self::throws(() → dynamic => f5b{dynamic}.call(0));
+ self::throws(() → dynamic => f5b{dynamic}.call<core::String>());
+ self::throws(() → dynamic => f5b{dynamic}.call<core::String, core::String>());
+ self::throws(() → dynamic => f5b{dynamic}.call<core::num, core::num>());
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+static method throws(() → dynamic f, {core::bool inSoundModeOnly = #C14}) → dynamic {
+ try {
+ f(){() → dynamic};
+ }
+ on core::Object catch(final core::Object e) {
+ core::print("Thrown: ${e}");
+ return;
+ }
+ if(!self::inSoundMode && inSoundModeOnly) {
+ return;
+ }
+ throw "Expected exception";
+}
+static method _#0#tearOff<unrelated X extends core::num>() → self::A
+ return (#C1)(){() → self::A};
+static method _#1#tearOff<unrelated X extends core::num>() → self::A
+ return (#C1)(){() → self::A};
+static method _#2#tearOff<X extends core::num>() → self::B<self::_#2#tearOff::X>
+ return (#C4)<self::_#2#tearOff::X>(){() → self::B<self::_#2#tearOff::X>};
+static method _#3#tearOff<X extends core::num>() → self::B<self::_#3#tearOff::X>
+ return (#C4)<self::_#3#tearOff::X>(){() → self::B<self::_#3#tearOff::X>};
+static method _#4#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#4#tearOff::X>
+ return (#C4)<self::_#4#tearOff::X>(){() → self::B<self::_#4#tearOff::X>};
+static method _#5#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#5#tearOff::X>
+ return (#C4)<self::_#5#tearOff::X>(){() → self::B<self::_#5#tearOff::X>};
+
+constants {
+ #C1 = static-tearoff self::A::_#new#tearOff
+ #C2 = static-tearoff self::_#0#tearOff
+ #C3 = static-tearoff self::_#1#tearOff
+ #C4 = static-tearoff self::B::_#new#tearOff
+ #C5 = instantiation self::B::_#new#tearOff <core::String*>
+ #C6 = static-tearoff self::B::_#foo#tearOff
+ #C7 = instantiation self::B::_#foo#tearOff <core::String*>
+ #C8 = static-tearoff self::B::_#bar#tearOff
+ #C9 = instantiation self::B::_#bar#tearOff <core::String*>
+ #C10 = static-tearoff self::_#2#tearOff
+ #C11 = static-tearoff self::_#3#tearOff
+ #C12 = static-tearoff self::_#4#tearOff
+ #C13 = static-tearoff self::_#5#tearOff
+ #C14 = false
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.weak.outline.expect
new file mode 100644
index 0000000..be18978
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.weak.outline.expect
@@ -0,0 +1,42 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef DA1 = self::A;
+typedef DA2<unrelated X extends core::num> = self::A;
+typedef DB1 = self::B<core::String>;
+typedef DB2<X extends core::num> = self::B<X>;
+typedef DB3<X extends core::num, unrelated Y extends core::String> = self::B<X>;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ ;
+ static method _#new#tearOff() → self::A
+ return new self::A::•();
+}
+class B<X extends core::Object? = dynamic> extends core::Object {
+ field core::int field1;
+ field core::String field2;
+ constructor _(core::int field1, core::String field2) → self::B<self::B::X%>
+ ;
+ constructor •() → self::B<self::B::X%>
+ ;
+ constructor foo(core::int field1) → self::B<self::B::X%>
+ ;
+ static method _#_#tearOff<X extends core::Object? = dynamic>(core::int field1, core::String field2) → self::B<self::B::_#_#tearOff::X%>
+ return new self::B::_<self::B::_#_#tearOff::X%>(field1, field2);
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::B<self::B::_#new#tearOff::X%>
+ return new self::B::•<self::B::_#new#tearOff::X%>();
+ static method _#foo#tearOff<X extends core::Object? = dynamic>(core::int field1) → self::B<self::B::_#foo#tearOff::X%>
+ return new self::B::foo<self::B::_#foo#tearOff::X%>(field1);
+ static factory bar<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::bar::X%>
+ ;
+ static method _#bar#tearOff<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::_#bar#tearOff::X%>
+ return self::B::bar<self::B::_#bar#tearOff::X%>(i, j);
+}
+static final field core::bool inSoundMode;
+static method main() → dynamic
+ ;
+static method expect(dynamic expected, dynamic actual) → dynamic
+ ;
+static method throws(() → dynamic f, {core::bool inSoundModeOnly}) → dynamic
+ ;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.weak.transformed.expect
new file mode 100644
index 0000000..3190b63
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart.weak.transformed.expect
@@ -0,0 +1,327 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:34:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f1a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:46:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f2a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:47:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f2a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:65:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f3a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:66:8: Error: Expected 0 type arguments.
+// f3a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:85:8: Error: Too few positional arguments: 1 required, 0 given.
+// f3c(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:86:8: Error: Too many positional arguments: 1 allowed, but 2 found.
+// Try removing the extra positional arguments.
+// f3c(0, 0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:87:8: Error: Expected 0 type arguments.
+// f3c<String>(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:107:8: Error: Too few positional arguments: 2 required, 0 given.
+// f3e(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:108:8: Error: Too few positional arguments: 2 required, 1 given.
+// f3e(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:109:8: Error: Expected 0 type arguments.
+// f3e<String>(0, ''); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:130:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f4a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:131:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f4a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:152:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+// Try removing the extra positional arguments.
+// f5a(0); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:153:8: Error: Expected 2 type arguments.
+// f5a<String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:154:8: Error: Type argument 'String' doesn't conform to the bound 'num' of the type variable 'X' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f5a<String, String>(); // error
+// ^
+//
+// pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:155:8: Error: Type argument 'num' doesn't conform to the bound 'String' of the type variable 'Y' on 'call'.
+// Try changing type arguments so that they conform to the bounds.
+// f5a<num, num>(); // error
+// ^
+//
+import self as self;
+import "dart:core" as core;
+
+typedef DA1 = self::A;
+typedef DA2<unrelated X extends core::num> = self::A;
+typedef DB1 = self::B<core::String>;
+typedef DB2<X extends core::num> = self::B<X>;
+typedef DB3<X extends core::num, unrelated Y extends core::String> = self::B<X>;
+class A extends core::Object {
+ synthetic constructor •() → self::A
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff() → self::A
+ return new self::A::•();
+}
+class B<X extends core::Object? = dynamic> extends core::Object {
+ field core::int field1;
+ field core::String field2;
+ constructor _(core::int field1, core::String field2) → self::B<self::B::X%>
+ : self::B::field1 = field1, self::B::field2 = field2, super core::Object::•()
+ ;
+ constructor •() → self::B<self::B::X%>
+ : this self::B::_(0, "")
+ ;
+ constructor foo(core::int field1) → self::B<self::B::X%>
+ : self::B::field1 = field1, self::B::field2 = "", super core::Object::•()
+ ;
+ static method _#_#tearOff<X extends core::Object? = dynamic>(core::int field1, core::String field2) → self::B<self::B::_#_#tearOff::X%>
+ return new self::B::_<self::B::_#_#tearOff::X%>(field1, field2);
+ static method _#new#tearOff<X extends core::Object? = dynamic>() → self::B<self::B::_#new#tearOff::X%>
+ return new self::B::•<self::B::_#new#tearOff::X%>();
+ static method _#foo#tearOff<X extends core::Object? = dynamic>(core::int field1) → self::B<self::B::_#foo#tearOff::X%>
+ return new self::B::foo<self::B::_#foo#tearOff::X%>(field1);
+ static factory bar<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::bar::X%>
+ return new self::B::_<self::B::bar::X%>(i, j);
+ static method _#bar#tearOff<X extends core::Object? = dynamic>(core::int i, core::String j) → self::B<self::B::_#bar#tearOff::X%>
+ return self::B::bar<self::B::_#bar#tearOff::X%>(i, j);
+}
+static final field core::bool inSoundMode = !(core::_GrowableList::•<core::int?>(0) is{ForNonNullableByDefault} core::List<core::int>);
+static method main() → dynamic {
+ () → self::A f1a = #C1;
+ self::A c1a = f1a(){() → self::A};
+ self::expect(true, c1a is{ForNonNullableByDefault} self::A);
+ () → Null {
+ let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:34:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f1a(0); // error
+ ^" in f1a{<inapplicable>}.(0);
+ };
+ dynamic f1b = #C1;
+ dynamic c1b = f1b{dynamic}.call();
+ self::expect(true, c1b is{ForNonNullableByDefault} self::A);
+ self::throws(() → dynamic => f1b{dynamic}.call(0));
+ <unrelated X extends core::num>() → self::A f2a = #C2;
+ self::A c2a = f2a<core::num>(){() → self::A};
+ self::expect(true, c2a is{ForNonNullableByDefault} self::A);
+ () → Null {
+ let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:46:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f2a(0); // error
+ ^" in f2a{<inapplicable>}.<core::num>(0);
+ f2a<core::String>(){() → self::A};
+ };
+ dynamic f2b = #C3;
+ dynamic c2b = f2b{dynamic}.call();
+ self::expect(true, c2b is{ForNonNullableByDefault} self::A);
+ dynamic c2c = f2b{dynamic}.call<core::int>();
+ self::expect(true, c2c is{ForNonNullableByDefault} self::A);
+ self::throws(() → dynamic => f2b{dynamic}.call(0));
+ self::throws(() → dynamic => f2b{dynamic}.call<core::String>());
+ () → self::B<core::String> f3a = #C5;
+ self::B<core::String> c3a = f3a(){() → self::B<core::String>};
+ self::expect(true, c3a is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3a is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(0, c3a.{self::B::field1}{core::int});
+ self::expect("", c3a.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:65:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f3a(0); // error
+ ^" in f3a{<inapplicable>}.(0);
+ let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:66:8: Error: Expected 0 type arguments.
+ f3a<String>(); // error
+ ^" in f3a{<inapplicable>}.<core::String>();
+ };
+ dynamic f3b = #C5;
+ dynamic c3b = f3b{dynamic}.call();
+ self::expect(true, c3b is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(0, c3a.{self::B::field1}{core::int});
+ self::expect("", c3a.{self::B::field2}{core::String});
+ self::throws(() → dynamic => f3b{dynamic}.call(0));
+ self::throws(() → dynamic => f3b{dynamic}.call<core::String>());
+ (core::int) → self::B<core::String> f3c = #C7;
+ self::B<core::String> c3c = f3c(42){(core::int) → self::B<core::String>};
+ self::expect(true, c3c is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3c is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3c.{self::B::field1}{core::int});
+ self::expect("", c3c.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:85:8: Error: Too few positional arguments: 1 required, 0 given.
+ f3c(); // error
+ ^" in f3c{<inapplicable>}.();
+ let final Never #t6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:86:8: Error: Too many positional arguments: 1 allowed, but 2 found.
+Try removing the extra positional arguments.
+ f3c(0, 0); // error
+ ^" in f3c{<inapplicable>}.(0, 0);
+ let final Never #t7 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:87:8: Error: Expected 0 type arguments.
+ f3c<String>(0); // error
+ ^" in f3c{<inapplicable>}.<core::String>(0);
+ };
+ dynamic f3d = #C7;
+ dynamic c3d = f3d{dynamic}.call(42);
+ self::expect(true, c3d is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3d{dynamic}.field1);
+ self::expect("", c3d{dynamic}.field2);
+ self::throws(() → dynamic => f3d{dynamic}.call());
+ self::throws(() → dynamic => f3d{dynamic}.call(0, 0));
+ self::throws(() → dynamic => f3d{dynamic}.call<core::String>(0));
+ (core::int, core::String) → self::B<core::String> f3e = #C9;
+ self::B<core::String> c3e = f3e(42, "foo"){(core::int, core::String) → self::B<core::String>};
+ self::expect(true, c3e is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3e is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3e.{self::B::field1}{core::int});
+ self::expect("foo", c3e.{self::B::field2}{core::String});
+ () → Null {
+ let final Never #t8 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:107:8: Error: Too few positional arguments: 2 required, 0 given.
+ f3e(); // error
+ ^" in f3e{<inapplicable>}.();
+ let final Never #t9 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:108:8: Error: Too few positional arguments: 2 required, 1 given.
+ f3e(0); // error
+ ^" in f3e{<inapplicable>}.(0);
+ let final Never #t10 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:109:8: Error: Expected 0 type arguments.
+ f3e<String>(0, ''); // error
+ ^" in f3e{<inapplicable>}.<core::String>(0, "");
+ };
+ dynamic f3f = #C9;
+ dynamic c3f = f3f{dynamic}.call(42, "foo");
+ self::expect(true, c3f is{ForNonNullableByDefault} self::B<core::String>);
+ self::expect(false, c3f is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(42, c3f{dynamic}.field1);
+ self::expect("foo", c3f{dynamic}.field2);
+ self::throws(() → dynamic => c3f{dynamic}.call());
+ self::throws(() → dynamic => c3f{dynamic}.call(0));
+ self::throws(() → dynamic => c3f{dynamic}.call<core::String>(0));
+ <X extends core::num>() → self::B<X> f4a = #C10;
+ self::B<core::num> c4a = f4a<core::num>(){() → self::B<core::num>};
+ self::expect(true, c4a is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c4a is{ForNonNullableByDefault} self::B<core::int>);
+ self::B<core::int> c4b = f4a<core::int>(){() → self::B<core::int>};
+ self::expect(true, c4b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c4b is{ForNonNullableByDefault} self::B<core::double>);
+ () → Null {
+ let final Never #t11 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:130:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f4a(0); // error
+ ^" in f4a{<inapplicable>}.<core::num>(0);
+ f4a<core::String>(){() → self::B<core::String>};
+ };
+ dynamic f4b = #C11;
+ dynamic c4c = f4b{dynamic}.call();
+ self::expect(true, c4c is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c4c is{ForNonNullableByDefault} self::B<core::int>);
+ dynamic c4d = f4b{dynamic}.call<core::int>();
+ self::expect(true, c4d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c4d is{ForNonNullableByDefault} self::B<core::double>);
+ self::throws(() → dynamic => f4b{dynamic}.call(0));
+ self::throws(() → dynamic => f4b{dynamic}.call<core::String>());
+ <X extends core::num, unrelated Y extends core::String>() → self::B<X> f5a = #C12;
+ self::B<core::num> c5a = f5a<core::num, core::String>(){() → self::B<core::num>};
+ self::expect(true, c5a is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c5a is{ForNonNullableByDefault} self::B<core::int>);
+ self::B<core::int> c5b = f5a<core::int, core::String>(){() → self::B<core::int>};
+ self::expect(true, c5b is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c5b is{ForNonNullableByDefault} self::B<core::double>);
+ () → Null {
+ let final Never #t12 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:152:8: Error: Too many positional arguments: 0 allowed, but 1 found.
+Try removing the extra positional arguments.
+ f5a(0); // error
+ ^" in f5a{<inapplicable>}.<core::num, core::String>(0);
+ let final Never #t13 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_tear_off.dart:153:8: Error: Expected 2 type arguments.
+ f5a<String>(); // error
+ ^" in f5a{<inapplicable>}.<core::String>();
+ f5a<core::String, core::String>(){() → self::B<core::String>};
+ f5a<core::num, core::num>(){() → self::B<core::num>};
+ };
+ dynamic f5b = #C13;
+ dynamic c5c = f5b{dynamic}.call();
+ self::expect(true, c5c is{ForNonNullableByDefault} self::B<core::num>);
+ self::expect(false, c5c is{ForNonNullableByDefault} self::B<core::int>);
+ dynamic c5d = f5b{dynamic}.call<core::int, core::String>();
+ self::expect(true, c5d is{ForNonNullableByDefault} self::B<core::int>);
+ self::expect(false, c5d is{ForNonNullableByDefault} self::B<core::double>);
+ self::throws(() → dynamic => f5b{dynamic}.call(0));
+ self::throws(() → dynamic => f5b{dynamic}.call<core::String>());
+ self::throws(() → dynamic => f5b{dynamic}.call<core::String, core::String>());
+ self::throws(() → dynamic => f5b{dynamic}.call<core::num, core::num>());
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+static method throws(() → dynamic f, {core::bool inSoundModeOnly = #C14}) → dynamic {
+ try {
+ f(){() → dynamic};
+ }
+ on core::Object catch(final core::Object e) {
+ core::print("Thrown: ${e}");
+ return;
+ }
+ if(!self::inSoundMode && inSoundModeOnly) {
+ return;
+ }
+ throw "Expected exception";
+}
+static method _#0#tearOff<unrelated X extends core::num>() → self::A
+ return (#C1)(){() → self::A};
+static method _#1#tearOff<unrelated X extends core::num>() → self::A
+ return (#C1)(){() → self::A};
+static method _#2#tearOff<X extends core::num>() → self::B<self::_#2#tearOff::X>
+ return (#C4)<self::_#2#tearOff::X>(){() → self::B<self::_#2#tearOff::X>};
+static method _#3#tearOff<X extends core::num>() → self::B<self::_#3#tearOff::X>
+ return (#C4)<self::_#3#tearOff::X>(){() → self::B<self::_#3#tearOff::X>};
+static method _#4#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#4#tearOff::X>
+ return (#C4)<self::_#4#tearOff::X>(){() → self::B<self::_#4#tearOff::X>};
+static method _#5#tearOff<X extends core::num, unrelated Y extends core::String>() → self::B<self::_#5#tearOff::X>
+ return (#C4)<self::_#5#tearOff::X>(){() → self::B<self::_#5#tearOff::X>};
+
+constants {
+ #C1 = static-tearoff self::A::_#new#tearOff
+ #C2 = static-tearoff self::_#0#tearOff
+ #C3 = static-tearoff self::_#1#tearOff
+ #C4 = static-tearoff self::B::_#new#tearOff
+ #C5 = instantiation self::B::_#new#tearOff <core::String*>
+ #C6 = static-tearoff self::B::_#foo#tearOff
+ #C7 = instantiation self::B::_#foo#tearOff <core::String*>
+ #C8 = static-tearoff self::B::_#bar#tearOff
+ #C9 = instantiation self::B::_#bar#tearOff <core::String*>
+ #C10 = static-tearoff self::_#2#tearOff
+ #C11 = static-tearoff self::_#3#tearOff
+ #C12 = static-tearoff self::_#4#tearOff
+ #C13 = static-tearoff self::_#5#tearOff
+ #C14 = false
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect
index f6026a2..7292491 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.expect
@@ -31,24 +31,31 @@
return new self::A::•();
}
static method test1() → () → self::A
- return self::A::foo1;
+ return #C1;
static method test2() → () → self::A
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13: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;
+ ^" in (#C2) as{TypeError,ForNonNullableByDefault} () → self::A;
static method test3() → () → self::A
- return self::A::•;
+ return #C3;
static method test4() → (core::int) → self::A
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test4() => A.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
static method test5() → () → self::A
- return self::A::bar1;
+ return #C4;
static method test6() → (core::int) → self::A
return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test6() => A.bar1; // Error.
- ^" in self::A::bar1 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo1
+ #C2 = constructor-tearoff self::A::foo2
+ #C3 = constructor-tearoff self::A::•
+ #C4 = static-tearoff self::A::bar1
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect
index f6026a2..7292491 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.strong.transformed.expect
@@ -31,24 +31,31 @@
return new self::A::•();
}
static method test1() → () → self::A
- return self::A::foo1;
+ return #C1;
static method test2() → () → self::A
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13: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;
+ ^" in (#C2) as{TypeError,ForNonNullableByDefault} () → self::A;
static method test3() → () → self::A
- return self::A::•;
+ return #C3;
static method test4() → (core::int) → self::A
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test4() => A.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
static method test5() → () → self::A
- return self::A::bar1;
+ return #C4;
static method test6() → (core::int) → self::A
return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test6() => A.bar1; // Error.
- ^" in self::A::bar1 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo1
+ #C2 = constructor-tearoff self::A::foo2
+ #C3 = constructor-tearoff self::A::•
+ #C4 = static-tearoff self::A::bar1
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect
index f6026a2..7292491 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.expect
@@ -31,24 +31,31 @@
return new self::A::•();
}
static method test1() → () → self::A
- return self::A::foo1;
+ return #C1;
static method test2() → () → self::A
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13: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;
+ ^" in (#C2) as{TypeError,ForNonNullableByDefault} () → self::A;
static method test3() → () → self::A
- return self::A::•;
+ return #C3;
static method test4() → (core::int) → self::A
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test4() => A.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
static method test5() → () → self::A
- return self::A::bar1;
+ return #C4;
static method test6() → (core::int) → self::A
return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test6() => A.bar1; // Error.
- ^" in self::A::bar1 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo1
+ #C2 = constructor-tearoff self::A::foo2
+ #C3 = constructor-tearoff self::A::•
+ #C4 = static-tearoff self::A::bar1
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect
index f6026a2..7292491 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.weak.transformed.expect
@@ -31,24 +31,31 @@
return new self::A::•();
}
static method test1() → () → self::A
- return self::A::foo1;
+ return #C1;
static method test2() → () → self::A
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:13: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;
+ ^" in (#C2) as{TypeError,ForNonNullableByDefault} () → self::A;
static method test3() → () → self::A
- return self::A::•;
+ return #C3;
static method test4() → (core::int) → self::A
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:15:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test4() => A.new; // Error.
- ^" in self::A::• as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
static method test5() → () → self::A
- return self::A::bar1;
+ return #C4;
static method test6() → (core::int) → self::A
return let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart:17:28: Error: A value of type 'A Function()' can't be returned from a function with return type 'A Function(int)'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart'.
A Function(int) test6() => A.bar1; // Error.
- ^" in self::A::bar1 as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} (core::int) → self::A;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo1
+ #C2 = constructor-tearoff self::A::foo2
+ #C3 = constructor-tearoff self::A::•
+ #C4 = static-tearoff self::A::bar1
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.expect
index f6db3b2..5d000f0 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.expect
@@ -32,11 +32,11 @@
return new self::A::•();
}
static method testFoo() → dynamic
- return self::A::foo;
+ return #C1;
static method testNew() → dynamic
- return self::A::•;
+ return #C2;
static method testBar() → dynamic
- return self::A::bar;
+ return #C3;
static method testFooExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
@@ -56,3 +56,9 @@
testBarExtraArgs() => A<int>.bar; // Error.
^";
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = constructor-tearoff self::A::•
+ #C3 = static-tearoff self::A::bar
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.transformed.expect
index f6db3b2..5d000f0 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.strong.transformed.expect
@@ -32,11 +32,11 @@
return new self::A::•();
}
static method testFoo() → dynamic
- return self::A::foo;
+ return #C1;
static method testNew() → dynamic
- return self::A::•;
+ return #C2;
static method testBar() → dynamic
- return self::A::bar;
+ return #C3;
static method testFooExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
@@ -56,3 +56,9 @@
testBarExtraArgs() => A<int>.bar; // Error.
^";
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = constructor-tearoff self::A::•
+ #C3 = static-tearoff self::A::bar
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.expect
index f6db3b2..5d000f0 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.expect
@@ -32,11 +32,11 @@
return new self::A::•();
}
static method testFoo() → dynamic
- return self::A::foo;
+ return #C1;
static method testNew() → dynamic
- return self::A::•;
+ return #C2;
static method testBar() → dynamic
- return self::A::bar;
+ return #C3;
static method testFooExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
@@ -56,3 +56,9 @@
testBarExtraArgs() => A<int>.bar; // Error.
^";
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = constructor-tearoff self::A::•
+ #C3 = static-tearoff self::A::bar
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.transformed.expect
index f6db3b2..5d000f0 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.weak.transformed.expect
@@ -32,11 +32,11 @@
return new self::A::•();
}
static method testFoo() → dynamic
- return self::A::foo;
+ return #C1;
static method testNew() → dynamic
- return self::A::•;
+ return #C2;
static method testBar() → dynamic
- return self::A::bar;
+ return #C3;
static method testFooExtraArgs() → dynamic
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart:15:23: Error: The static type of the explicit instantiation operand must be a generic function type but is 'A Function()'.
- 'A' is from 'pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart'.
@@ -56,3 +56,9 @@
testBarExtraArgs() => A<int>.bar; // Error.
^";
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::foo
+ #C2 = constructor-tearoff self::A::•
+ #C3 = static-tearoff self::A::bar
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.strong.expect
index c7776f1..4251833 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.strong.expect
@@ -50,9 +50,9 @@
;
}
static method test() → dynamic {
- () → self::A f1 = self::A::redirectingFactory;
- () → self::A f2 = self::A::redirectingFactoryChild;
- () → self::A f3 = self::A::redirectingTwice;
+ () → self::A f1 = #C1;
+ () → self::A f2 = #C2;
+ () → self::A f3 = #C3;
self::A x1 = f1(){() → self::A};
self::B x2 = f2(){() → self::A} as{ForNonNullableByDefault} self::B;
self::A x3;
@@ -60,3 +60,9 @@
}
static method main() → dynamic
return self::test();
+
+constants {
+ #C1 = static-tearoff self::A::redirectingFactory
+ #C2 = static-tearoff self::A::redirectingFactoryChild
+ #C3 = static-tearoff self::A::redirectingTwice
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.strong.transformed.expect
index e232b6bf..4f2b568 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.strong.transformed.expect
@@ -50,9 +50,9 @@
;
}
static method test() → dynamic {
- () → self::A f1 = self::A::redirectingFactory;
- () → self::A f2 = self::A::redirectingFactoryChild;
- () → self::A f3 = self::A::redirectingTwice;
+ () → self::A f1 = #C1;
+ () → self::A f2 = #C2;
+ () → self::A f3 = #C3;
self::A x1 = f1(){() → self::A};
self::B x2 = f2(){() → self::A} as{ForNonNullableByDefault} self::B;
self::A x3;
@@ -60,3 +60,9 @@
}
static method main() → dynamic
return self::test();
+
+constants {
+ #C1 = static-tearoff self::A::redirectingFactory
+ #C2 = static-tearoff self::A::redirectingFactoryChild
+ #C3 = static-tearoff self::A::redirectingTwice
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.weak.expect
index c7776f1..4251833 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.weak.expect
@@ -50,9 +50,9 @@
;
}
static method test() → dynamic {
- () → self::A f1 = self::A::redirectingFactory;
- () → self::A f2 = self::A::redirectingFactoryChild;
- () → self::A f3 = self::A::redirectingTwice;
+ () → self::A f1 = #C1;
+ () → self::A f2 = #C2;
+ () → self::A f3 = #C3;
self::A x1 = f1(){() → self::A};
self::B x2 = f2(){() → self::A} as{ForNonNullableByDefault} self::B;
self::A x3;
@@ -60,3 +60,9 @@
}
static method main() → dynamic
return self::test();
+
+constants {
+ #C1 = static-tearoff self::A::redirectingFactory
+ #C2 = static-tearoff self::A::redirectingFactoryChild
+ #C3 = static-tearoff self::A::redirectingTwice
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.weak.transformed.expect
index e232b6bf..4f2b568 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.weak.transformed.expect
@@ -50,9 +50,9 @@
;
}
static method test() → dynamic {
- () → self::A f1 = self::A::redirectingFactory;
- () → self::A f2 = self::A::redirectingFactoryChild;
- () → self::A f3 = self::A::redirectingTwice;
+ () → self::A f1 = #C1;
+ () → self::A f2 = #C2;
+ () → self::A f3 = #C3;
self::A x1 = f1(){() → self::A};
self::B x2 = f2(){() → self::A} as{ForNonNullableByDefault} self::B;
self::A x3;
@@ -60,3 +60,9 @@
}
static method main() → dynamic
return self::test();
+
+constants {
+ #C1 = static-tearoff self::A::redirectingFactory
+ #C2 = static-tearoff self::A::redirectingFactoryChild
+ #C3 = static-tearoff self::A::redirectingTwice
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.expect
index 0b438b0..f1d8c77 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.expect
@@ -59,40 +59,40 @@
return new self::B::•<self::B::bar::X%>();
}
static method test1() → () → self::A
- return self::A::•;
+ return #C1;
static method test2() → () → self::A
- return self::A::•;
+ return #C1;
static method test3() → () → self::A
- return <unrelated X extends core::num>.(self::A::•)<core::num>;
+ return <unrelated X extends core::num>.(#C1)<core::num>;
static method test4() → () → self::A
- return <unrelated X extends core::num>.(self::A::•)<core::num>;
+ return <unrelated X extends core::num>.(#C1)<core::num>;
static method test5() → () → self::A
- return self::A::•;
+ return #C1;
static method test6() → () → self::A
- return self::A::•;
+ return #C1;
static method test7() → () → self::B<core::String>
- return self::B::•<core::String>;
+ return #C3;
static method test8() → () → self::B<core::String>
- return self::B::•<core::String>;
+ return #C3;
static method test9() → () → self::B<core::num>
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:33:30: Error: A value of type 'B<String> Function()' can't be returned from a function with return type 'B<num> Function()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<num> Function() test9() => DB1.new; // Error.
- ^" in (self::B::•<core::String>) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
static method test10() → () → self::B<core::String>
- return self::B::foo<core::String>;
+ return #C5;
static method test11() → () → self::B<core::String>
- return self::B::bar<core::String>;
+ return #C7;
static method test12() → () → self::B<core::num>
- return self::B::•<core::num>;
+ return #C8;
static method test13() → () → self::B<core::num>
- return self::B::foo<core::num>;
+ return #C9;
static method test14() → () → self::B<core::num>
- return self::B::bar<core::num>;
+ return #C10;
static method test15() → () → self::B<core::num>
- return <X extends core::num>.(self::B::•<X>)<core::num>;
+ return <X extends core::num>.(#C2<X>)<core::num>;
static method test16() → <Y extends core::num = dynamic>() → self::B<Y>
- return <X extends core::num>.(self::B::•<X>);
+ return <X extends core::num>.(#C2<X>);
static method test17() → <Y extends core::Object? = dynamic>() → self::B<Y%>
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
@@ -100,17 +100,17 @@
^" in (let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<Y> Function<Y>() test17() => DB2.new; // Error.
- ^" in (<X extends core::num>.(self::B::•<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (<X extends core::num>.(#C2<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
static method test18() → () → self::B<core::num>
- return self::B::•<core::num>;
+ return #C8;
static method test19() → () → self::B<core::num>
- return self::B::foo<core::num>;
+ return #C9;
static method test20() → () → self::B<core::num>
- return self::B::bar<core::num>;
+ return #C10;
static method test21() → () → self::B<core::num>
- return <X extends core::num, unrelated Y extends core::String>.(self::B::•<X>)<core::num, core::String>;
+ return <X extends core::num, unrelated Y extends core::String>.(#C2<X>)<core::num, core::String>;
static method test22() → <Y extends core::num = dynamic, Z extends core::String = dynamic>() → self::B<Y>
- return <X extends core::num, unrelated Y extends core::String>.(self::B::•<X>);
+ return <X extends core::num, unrelated Y extends core::String>.(#C2<X>);
static method test23() → <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>
return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
@@ -118,7 +118,20 @@
^" in (let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
- ^" in (<X extends core::num, unrelated Y extends core::String>.(self::B::•<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (<X extends core::num, unrelated Y extends core::String>.(#C2<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
static method test24() → () → self::B<core::String>
- return <X extends core::num>.(self::B::•<X>)<Never>;
+ return <X extends core::num>.(#C2<X>)<Never>;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::•
+ #C2 = constructor-tearoff self::B::•
+ #C3 = instantiation self::B::• <core::String>
+ #C4 = constructor-tearoff self::B::foo
+ #C5 = instantiation self::B::foo <core::String>
+ #C6 = static-tearoff self::B::bar
+ #C7 = instantiation self::B::bar <core::String>
+ #C8 = instantiation self::B::• <core::num>
+ #C9 = instantiation self::B::foo <core::num>
+ #C10 = instantiation self::B::bar <core::num>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.transformed.expect
index 876caac..b64fd31 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.strong.transformed.expect
@@ -59,40 +59,40 @@
return new self::B::•<self::B::bar::X%>();
}
static method test1() → () → self::A
- return self::A::•;
+ return #C1;
static method test2() → () → self::A
- return self::A::•;
+ return #C1;
static method test3() → () → self::A
- return <unrelated X extends core::num>.(self::A::•)<core::num>;
+ return <unrelated X extends core::num>.(#C1)<core::num>;
static method test4() → () → self::A
- return <unrelated X extends core::num>.(self::A::•)<core::num>;
+ return <unrelated X extends core::num>.(#C1)<core::num>;
static method test5() → () → self::A
- return self::A::•;
+ return #C1;
static method test6() → () → self::A
- return self::A::•;
+ return #C1;
static method test7() → () → self::B<core::String>
- return self::B::•<core::String>;
+ return #C3;
static method test8() → () → self::B<core::String>
- return self::B::•<core::String>;
+ return #C3;
static method test9() → () → self::B<core::num>
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:33:30: Error: A value of type 'B<String> Function()' can't be returned from a function with return type 'B<num> Function()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<num> Function() test9() => DB1.new; // Error.
- ^" in (self::B::•<core::String>) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
static method test10() → () → self::B<core::String>
- return self::B::foo<core::String>;
+ return #C5;
static method test11() → () → self::B<core::String>
- return self::B::bar<core::String>;
+ return #C7;
static method test12() → () → self::B<core::num>
- return self::B::•<core::num>;
+ return #C8;
static method test13() → () → self::B<core::num>
- return self::B::foo<core::num>;
+ return #C9;
static method test14() → () → self::B<core::num>
- return self::B::bar<core::num>;
+ return #C10;
static method test15() → () → self::B<core::num>
- return <X extends core::num>.(self::B::•<X>)<core::num>;
+ return <X extends core::num>.(#C2<X>)<core::num>;
static method test16() → <Y extends core::num = dynamic>() → self::B<Y>
- return <X extends core::num>.(self::B::•<X>);
+ return <X extends core::num>.(#C2<X>);
static method test17() → <Y extends core::Object? = dynamic>() → self::B<Y%>
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
@@ -100,17 +100,17 @@
^" in let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<Y> Function<Y>() test17() => DB2.new; // Error.
- ^" in (<X extends core::num>.(self::B::•<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (<X extends core::num>.(#C2<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
static method test18() → () → self::B<core::num>
- return self::B::•<core::num>;
+ return #C8;
static method test19() → () → self::B<core::num>
- return self::B::foo<core::num>;
+ return #C9;
static method test20() → () → self::B<core::num>
- return self::B::bar<core::num>;
+ return #C10;
static method test21() → () → self::B<core::num>
- return <X extends core::num, unrelated Y extends core::String>.(self::B::•<X>)<core::num, core::String>;
+ return <X extends core::num, unrelated Y extends core::String>.(#C2<X>)<core::num, core::String>;
static method test22() → <Y extends core::num = dynamic, Z extends core::String = dynamic>() → self::B<Y>
- return <X extends core::num, unrelated Y extends core::String>.(self::B::•<X>);
+ return <X extends core::num, unrelated Y extends core::String>.(#C2<X>);
static method test23() → <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>
return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
@@ -118,7 +118,20 @@
^" in let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
- ^" in (<X extends core::num, unrelated Y extends core::String>.(self::B::•<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (<X extends core::num, unrelated Y extends core::String>.(#C2<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
static method test24() → () → self::B<core::String>
- return <X extends core::num>.(self::B::•<X>)<Never>;
+ return <X extends core::num>.(#C2<X>)<Never>;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::•
+ #C2 = constructor-tearoff self::B::•
+ #C3 = instantiation self::B::• <core::String>
+ #C4 = constructor-tearoff self::B::foo
+ #C5 = instantiation self::B::foo <core::String>
+ #C6 = static-tearoff self::B::bar
+ #C7 = instantiation self::B::bar <core::String>
+ #C8 = instantiation self::B::• <core::num>
+ #C9 = instantiation self::B::foo <core::num>
+ #C10 = instantiation self::B::bar <core::num>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.expect
index 0b438b0..85a026d 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.expect
@@ -59,40 +59,40 @@
return new self::B::•<self::B::bar::X%>();
}
static method test1() → () → self::A
- return self::A::•;
+ return #C1;
static method test2() → () → self::A
- return self::A::•;
+ return #C1;
static method test3() → () → self::A
- return <unrelated X extends core::num>.(self::A::•)<core::num>;
+ return <unrelated X extends core::num>.(#C1)<core::num>;
static method test4() → () → self::A
- return <unrelated X extends core::num>.(self::A::•)<core::num>;
+ return <unrelated X extends core::num>.(#C1)<core::num>;
static method test5() → () → self::A
- return self::A::•;
+ return #C1;
static method test6() → () → self::A
- return self::A::•;
+ return #C1;
static method test7() → () → self::B<core::String>
- return self::B::•<core::String>;
+ return #C3;
static method test8() → () → self::B<core::String>
- return self::B::•<core::String>;
+ return #C3;
static method test9() → () → self::B<core::num>
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:33:30: Error: A value of type 'B<String> Function()' can't be returned from a function with return type 'B<num> Function()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<num> Function() test9() => DB1.new; // Error.
- ^" in (self::B::•<core::String>) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
static method test10() → () → self::B<core::String>
- return self::B::foo<core::String>;
+ return #C5;
static method test11() → () → self::B<core::String>
- return self::B::bar<core::String>;
+ return #C7;
static method test12() → () → self::B<core::num>
- return self::B::•<core::num>;
+ return #C8;
static method test13() → () → self::B<core::num>
- return self::B::foo<core::num>;
+ return #C9;
static method test14() → () → self::B<core::num>
- return self::B::bar<core::num>;
+ return #C10;
static method test15() → () → self::B<core::num>
- return <X extends core::num>.(self::B::•<X>)<core::num>;
+ return <X extends core::num>.(#C2<X>)<core::num>;
static method test16() → <Y extends core::num = dynamic>() → self::B<Y>
- return <X extends core::num>.(self::B::•<X>);
+ return <X extends core::num>.(#C2<X>);
static method test17() → <Y extends core::Object? = dynamic>() → self::B<Y%>
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
@@ -100,17 +100,17 @@
^" in (let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<Y> Function<Y>() test17() => DB2.new; // Error.
- ^" in (<X extends core::num>.(self::B::•<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (<X extends core::num>.(#C2<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
static method test18() → () → self::B<core::num>
- return self::B::•<core::num>;
+ return #C8;
static method test19() → () → self::B<core::num>
- return self::B::foo<core::num>;
+ return #C9;
static method test20() → () → self::B<core::num>
- return self::B::bar<core::num>;
+ return #C10;
static method test21() → () → self::B<core::num>
- return <X extends core::num, unrelated Y extends core::String>.(self::B::•<X>)<core::num, core::String>;
+ return <X extends core::num, unrelated Y extends core::String>.(#C2<X>)<core::num, core::String>;
static method test22() → <Y extends core::num = dynamic, Z extends core::String = dynamic>() → self::B<Y>
- return <X extends core::num, unrelated Y extends core::String>.(self::B::•<X>);
+ return <X extends core::num, unrelated Y extends core::String>.(#C2<X>);
static method test23() → <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>
return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
@@ -118,7 +118,20 @@
^" in (let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
- ^" in (<X extends core::num, unrelated Y extends core::String>.(self::B::•<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (<X extends core::num, unrelated Y extends core::String>.(#C2<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
static method test24() → () → self::B<core::String>
- return <X extends core::num>.(self::B::•<X>)<Never>;
+ return <X extends core::num>.(#C2<X>)<Never>;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::•
+ #C2 = constructor-tearoff self::B::•
+ #C3 = instantiation self::B::• <core::String*>
+ #C4 = constructor-tearoff self::B::foo
+ #C5 = instantiation self::B::foo <core::String*>
+ #C6 = static-tearoff self::B::bar
+ #C7 = instantiation self::B::bar <core::String*>
+ #C8 = instantiation self::B::• <core::num*>
+ #C9 = instantiation self::B::foo <core::num*>
+ #C10 = instantiation self::B::bar <core::num*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.transformed.expect
index 876caac..5146a3b 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.weak.transformed.expect
@@ -59,40 +59,40 @@
return new self::B::•<self::B::bar::X%>();
}
static method test1() → () → self::A
- return self::A::•;
+ return #C1;
static method test2() → () → self::A
- return self::A::•;
+ return #C1;
static method test3() → () → self::A
- return <unrelated X extends core::num>.(self::A::•)<core::num>;
+ return <unrelated X extends core::num>.(#C1)<core::num>;
static method test4() → () → self::A
- return <unrelated X extends core::num>.(self::A::•)<core::num>;
+ return <unrelated X extends core::num>.(#C1)<core::num>;
static method test5() → () → self::A
- return self::A::•;
+ return #C1;
static method test6() → () → self::A
- return self::A::•;
+ return #C1;
static method test7() → () → self::B<core::String>
- return self::B::•<core::String>;
+ return #C3;
static method test8() → () → self::B<core::String>
- return self::B::•<core::String>;
+ return #C3;
static method test9() → () → self::B<core::num>
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:33:30: Error: A value of type 'B<String> Function()' can't be returned from a function with return type 'B<num> Function()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<num> Function() test9() => DB1.new; // Error.
- ^" in (self::B::•<core::String>) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+ ^" in (#C3) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
static method test10() → () → self::B<core::String>
- return self::B::foo<core::String>;
+ return #C5;
static method test11() → () → self::B<core::String>
- return self::B::bar<core::String>;
+ return #C7;
static method test12() → () → self::B<core::num>
- return self::B::•<core::num>;
+ return #C8;
static method test13() → () → self::B<core::num>
- return self::B::foo<core::num>;
+ return #C9;
static method test14() → () → self::B<core::num>
- return self::B::bar<core::num>;
+ return #C10;
static method test15() → () → self::B<core::num>
- return <X extends core::num>.(self::B::•<X>)<core::num>;
+ return <X extends core::num>.(#C2<X>)<core::num>;
static method test16() → <Y extends core::num = dynamic>() → self::B<Y>
- return <X extends core::num>.(self::B::•<X>);
+ return <X extends core::num>.(#C2<X>);
static method test17() → <Y extends core::Object? = dynamic>() → self::B<Y%>
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be returned from a function with return type 'B<Y> Function<Y>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
@@ -100,17 +100,17 @@
^" in let final Never #t3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:42:32: Error: A value of type 'B<X> Function<X extends num>()' can't be assigned to a variable of type 'B<Y> Function<Y>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<Y> Function<Y>() test17() => DB2.new; // Error.
- ^" in (<X extends core::num>.(self::B::•<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (<X extends core::num>.(#C2<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
static method test18() → () → self::B<core::num>
- return self::B::•<core::num>;
+ return #C8;
static method test19() → () → self::B<core::num>
- return self::B::foo<core::num>;
+ return #C9;
static method test20() → () → self::B<core::num>
- return self::B::bar<core::num>;
+ return #C10;
static method test21() → () → self::B<core::num>
- return <X extends core::num, unrelated Y extends core::String>.(self::B::•<X>)<core::num, core::String>;
+ return <X extends core::num, unrelated Y extends core::String>.(#C2<X>)<core::num, core::String>;
static method test22() → <Y extends core::num = dynamic, Z extends core::String = dynamic>() → self::B<Y>
- return <X extends core::num, unrelated Y extends core::String>.(self::B::•<X>);
+ return <X extends core::num, unrelated Y extends core::String>.(#C2<X>);
static method test23() → <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>
return let final Never #t4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be returned from a function with return type 'B<Y> Function<Y, Z>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
@@ -118,7 +118,20 @@
^" in let final Never #t5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart:49:35: Error: A value of type 'B<X> Function<X extends num, Y extends String>()' can't be assigned to a variable of type 'B<Y> Function<Y, Z>()'.
- 'B' is from 'pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart'.
B<Y> Function<Y, Z>() test23() => DB3.new; // Error.
- ^" in (<X extends core::num, unrelated Y extends core::String>.(self::B::•<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (<X extends core::num, unrelated Y extends core::String>.(#C2<X>)) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
static method test24() → () → self::B<core::String>
- return <X extends core::num>.(self::B::•<X>)<Never>;
+ return <X extends core::num>.(#C2<X>)<Never>;
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::A::•
+ #C2 = constructor-tearoff self::B::•
+ #C3 = instantiation self::B::• <core::String*>
+ #C4 = constructor-tearoff self::B::foo
+ #C5 = instantiation self::B::foo <core::String*>
+ #C6 = static-tearoff self::B::bar
+ #C7 = instantiation self::B::bar <core::String*>
+ #C8 = instantiation self::B::• <core::num*>
+ #C9 = instantiation self::B::foo <core::num*>
+ #C10 = instantiation self::B::bar <core::num*>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.expect
index 74eb491..8bde084 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.expect
@@ -117,11 +117,11 @@
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::B f2 = self::B::•;
+ () → self::B f2 = #C1;
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::D f4 = self::D::•;
+ (core::int) → self::D f4 = #C2;
f1{dynamic}.call();
f2(){() → self::B};
f3{dynamic}.call(1);
@@ -129,14 +129,19 @@
() → 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::B g2 = self::B::•;
+ () → self::B g2 = #C1;
(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::D g4 = self::D::•;
+ (core::int) → self::D g4 = #C2;
g1(){() → self::A};
g2(){() → self::B};
g3(1){(core::int) → self::C};
g4(1){(core::int) → self::D};
}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::B::•
+ #C2 = constructor-tearoff self::D::•
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.transformed.expect
index 5779400..be73c25 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.strong.transformed.expect
@@ -117,11 +117,11 @@
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::B f2 = self::B::•;
+ () → self::B f2 = #C1;
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::D f4 = self::D::•;
+ (core::int) → self::D f4 = #C2;
f1{dynamic}.call();
f2(){() → self::B};
f3{dynamic}.call(1);
@@ -129,14 +129,19 @@
() → 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::B g2 = self::B::•;
+ () → self::B g2 = #C1;
(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::D g4 = self::D::•;
+ (core::int) → self::D g4 = #C2;
g1(){() → self::A};
g2(){() → self::B};
g3(1){(core::int) → self::C};
g4(1){(core::int) → self::D};
}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::B::•
+ #C2 = constructor-tearoff self::D::•
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.expect
index 74eb491..8bde084 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.expect
@@ -117,11 +117,11 @@
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::B f2 = self::B::•;
+ () → self::B f2 = #C1;
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::D f4 = self::D::•;
+ (core::int) → self::D f4 = #C2;
f1{dynamic}.call();
f2(){() → self::B};
f3{dynamic}.call(1);
@@ -129,14 +129,19 @@
() → 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::B g2 = self::B::•;
+ () → self::B g2 = #C1;
(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::D g4 = self::D::•;
+ (core::int) → self::D g4 = #C2;
g1(){() → self::A};
g2(){() → self::B};
g3(1){(core::int) → self::C};
g4(1){(core::int) → self::D};
}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::B::•
+ #C2 = constructor-tearoff self::D::•
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.transformed.expect
index 5779400..be73c25 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.weak.transformed.expect
@@ -117,11 +117,11 @@
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::B f2 = self::B::•;
+ () → self::B f2 = #C1;
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::D f4 = self::D::•;
+ (core::int) → self::D f4 = #C2;
f1{dynamic}.call();
f2(){() → self::B};
f3{dynamic}.call(1);
@@ -129,14 +129,19 @@
() → 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::B g2 = self::B::•;
+ () → self::B g2 = #C1;
(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::D g4 = self::D::•;
+ (core::int) → self::D g4 = #C2;
g1(){() → self::A};
g2(){() → self::B};
g3(1){(core::int) → self::C};
g4(1){(core::int) → self::D};
}
static method main() → dynamic {}
+
+constants {
+ #C1 = constructor-tearoff self::B::•
+ #C2 = constructor-tearoff self::D::•
+}
diff --git a/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.strong.expect b/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.strong.expect
index e29a84e..d463dc9 100644
--- a/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.strong.expect
+++ b/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.strong.expect
@@ -21,5 +21,5 @@
}
constants {
- #C1 = tearoff self::id
+ #C1 = static-tearoff self::id
}
diff --git a/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.strong.transformed.expect
index 6a431a4..977003e 100644
--- a/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.strong.transformed.expect
@@ -21,7 +21,7 @@
}
constants {
- #C1 = tearoff self::id
+ #C1 = static-tearoff self::id
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.weak.expect b/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.weak.expect
index e29a84e..d463dc9 100644
--- a/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.weak.expect
+++ b/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.weak.expect
@@ -21,5 +21,5 @@
}
constants {
- #C1 = tearoff self::id
+ #C1 = static-tearoff self::id
}
diff --git a/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.weak.transformed.expect
index 6a431a4..977003e 100644
--- a/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/instance_getter_invocation.dart.weak.transformed.expect
@@ -21,7 +21,7 @@
}
constants {
- #C1 = tearoff self::id
+ #C1 = static-tearoff self::id
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.strong.expect b/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.strong.expect
index e29a84e..d463dc9 100644
--- a/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.strong.expect
+++ b/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.strong.expect
@@ -21,5 +21,5 @@
}
constants {
- #C1 = tearoff self::id
+ #C1 = static-tearoff self::id
}
diff --git a/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.strong.transformed.expect b/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.strong.transformed.expect
index 6a431a4..977003e 100644
--- a/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.strong.transformed.expect
@@ -21,7 +21,7 @@
}
constants {
- #C1 = tearoff self::id
+ #C1 = static-tearoff self::id
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.weak.expect b/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.weak.expect
index e29a84e..d463dc9 100644
--- a/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.weak.expect
+++ b/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.weak.expect
@@ -21,5 +21,5 @@
}
constants {
- #C1 = tearoff self::id
+ #C1 = static-tearoff self::id
}
diff --git a/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.weak.transformed.expect b/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.weak.transformed.expect
index 6a431a4..977003e 100644
--- a/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/dartdevc/instance_getter_invocation.dart.weak.transformed.expect
@@ -21,7 +21,7 @@
}
constants {
- #C1 = tearoff self::id
+ #C1 = static-tearoff self::id
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/extensions/default_values.dart.weak.expect b/pkg/front_end/testcases/extensions/default_values.dart.weak.expect
index f4256f5..99dd7ec 100644
--- a/pkg/front_end/testcases/extensions/default_values.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/default_values.dart.weak.expect
@@ -71,5 +71,5 @@
#C1 = null
#C2 = 42
#C3 = 87
- #C4 = tearoff self::Extension|staticMethod
+ #C4 = static-tearoff self::Extension|staticMethod
}
diff --git a/pkg/front_end/testcases/extensions/default_values.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/default_values.dart.weak.transformed.expect
index f4256f5..99dd7ec 100644
--- a/pkg/front_end/testcases/extensions/default_values.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/default_values.dart.weak.transformed.expect
@@ -71,5 +71,5 @@
#C1 = null
#C2 = 42
#C3 = 87
- #C4 = tearoff self::Extension|staticMethod
+ #C4 = static-tearoff self::Extension|staticMethod
}
diff --git a/pkg/front_end/testcases/extensions/direct_static_access.dart.weak.expect b/pkg/front_end/testcases/extensions/direct_static_access.dart.weak.expect
index bef26cf..942973c 100644
--- a/pkg/front_end/testcases/extensions/direct_static_access.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/direct_static_access.dart.weak.expect
@@ -232,11 +232,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Extension|readGetter
- #C3 = tearoff self::Extension|writeSetterRequired
- #C4 = tearoff self::Extension|writeSetterOptional
- #C5 = tearoff self::Extension|writeSetterNamed
- #C6 = tearoff self::Extension|genericWriteSetterRequired
- #C7 = tearoff self::Extension|genericWriteSetterOptional
- #C8 = tearoff self::Extension|genericWriteSetterNamed
+ #C2 = static-tearoff self::Extension|readGetter
+ #C3 = static-tearoff self::Extension|writeSetterRequired
+ #C4 = static-tearoff self::Extension|writeSetterOptional
+ #C5 = static-tearoff self::Extension|writeSetterNamed
+ #C6 = static-tearoff self::Extension|genericWriteSetterRequired
+ #C7 = static-tearoff self::Extension|genericWriteSetterOptional
+ #C8 = static-tearoff self::Extension|genericWriteSetterNamed
}
diff --git a/pkg/front_end/testcases/extensions/direct_static_access.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/direct_static_access.dart.weak.transformed.expect
index bef26cf..942973c 100644
--- a/pkg/front_end/testcases/extensions/direct_static_access.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/direct_static_access.dart.weak.transformed.expect
@@ -232,11 +232,11 @@
constants {
#C1 = null
- #C2 = tearoff self::Extension|readGetter
- #C3 = tearoff self::Extension|writeSetterRequired
- #C4 = tearoff self::Extension|writeSetterOptional
- #C5 = tearoff self::Extension|writeSetterNamed
- #C6 = tearoff self::Extension|genericWriteSetterRequired
- #C7 = tearoff self::Extension|genericWriteSetterOptional
- #C8 = tearoff self::Extension|genericWriteSetterNamed
+ #C2 = static-tearoff self::Extension|readGetter
+ #C3 = static-tearoff self::Extension|writeSetterRequired
+ #C4 = static-tearoff self::Extension|writeSetterOptional
+ #C5 = static-tearoff self::Extension|writeSetterNamed
+ #C6 = static-tearoff self::Extension|genericWriteSetterRequired
+ #C7 = static-tearoff self::Extension|genericWriteSetterOptional
+ #C8 = static-tearoff self::Extension|genericWriteSetterNamed
}
diff --git a/pkg/front_end/testcases/extensions/export_from_dill/main.dart.weak.expect b/pkg/front_end/testcases/extensions/export_from_dill/main.dart.weak.expect
index d7c5320..214f428 100644
--- a/pkg/front_end/testcases/extensions/export_from_dill/main.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/export_from_dill/main.dart.weak.expect
@@ -56,5 +56,5 @@
constants {
#C1 = 42
- #C2 = tearoff mai::Extension|staticMethod
+ #C2 = static-tearoff mai::Extension|staticMethod
}
diff --git a/pkg/front_end/testcases/extensions/export_from_dill/main.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/export_from_dill/main.dart.weak.transformed.expect
index d7c5320..214f428 100644
--- a/pkg/front_end/testcases/extensions/export_from_dill/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/export_from_dill/main.dart.weak.transformed.expect
@@ -56,5 +56,5 @@
constants {
#C1 = 42
- #C2 = tearoff mai::Extension|staticMethod
+ #C2 = static-tearoff mai::Extension|staticMethod
}
diff --git a/pkg/front_end/testcases/extensions/import_from_dill/main.dart.weak.expect b/pkg/front_end/testcases/extensions/import_from_dill/main.dart.weak.expect
index dda54b1..4dc6953 100644
--- a/pkg/front_end/testcases/extensions/import_from_dill/main.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/import_from_dill/main.dart.weak.expect
@@ -48,5 +48,5 @@
constants {
#C1 = 42
- #C2 = tearoff mai::Extension|staticMethod
+ #C2 = static-tearoff mai::Extension|staticMethod
}
diff --git a/pkg/front_end/testcases/extensions/import_from_dill/main.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/import_from_dill/main.dart.weak.transformed.expect
index dda54b1..4dc6953 100644
--- a/pkg/front_end/testcases/extensions/import_from_dill/main.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/import_from_dill/main.dart.weak.transformed.expect
@@ -48,5 +48,5 @@
constants {
#C1 = 42
- #C2 = tearoff mai::Extension|staticMethod
+ #C2 = static-tearoff mai::Extension|staticMethod
}
diff --git a/pkg/front_end/testcases/extensions/static_access.dart.weak.expect b/pkg/front_end/testcases/extensions/static_access.dart.weak.expect
index 5cc472a..973805f 100644
--- a/pkg/front_end/testcases/extensions/static_access.dart.weak.expect
+++ b/pkg/front_end/testcases/extensions/static_access.dart.weak.expect
@@ -53,6 +53,6 @@
}
constants {
- #C1 = tearoff self::Extension|method
- #C2 = tearoff self::Extension|genericMethod
+ #C1 = static-tearoff self::Extension|method
+ #C2 = static-tearoff self::Extension|genericMethod
}
diff --git a/pkg/front_end/testcases/extensions/static_access.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/static_access.dart.weak.transformed.expect
index 5cc472a..973805f 100644
--- a/pkg/front_end/testcases/extensions/static_access.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/static_access.dart.weak.transformed.expect
@@ -53,6 +53,6 @@
}
constants {
- #C1 = tearoff self::Extension|method
- #C2 = tearoff self::Extension|genericMethod
+ #C1 = static-tearoff self::Extension|method
+ #C2 = static-tearoff self::Extension|genericMethod
}
diff --git a/pkg/front_end/testcases/general/argument.dart.weak.expect b/pkg/front_end/testcases/general/argument.dart.weak.expect
index 90b185e..e667193 100644
--- a/pkg/front_end/testcases/general/argument.dart.weak.expect
+++ b/pkg/front_end/testcases/general/argument.dart.weak.expect
@@ -47,6 +47,6 @@
}
constants {
- #C1 = tearoff self::foo_escaped
- #C2 = tearoff self::bar_escaped
+ #C1 = static-tearoff self::foo_escaped
+ #C2 = static-tearoff self::bar_escaped
}
diff --git a/pkg/front_end/testcases/general/argument.dart.weak.transformed.expect b/pkg/front_end/testcases/general/argument.dart.weak.transformed.expect
index 90b185e..e667193 100644
--- a/pkg/front_end/testcases/general/argument.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/argument.dart.weak.transformed.expect
@@ -47,6 +47,6 @@
}
constants {
- #C1 = tearoff self::foo_escaped
- #C2 = tearoff self::bar_escaped
+ #C1 = static-tearoff self::foo_escaped
+ #C2 = static-tearoff self::bar_escaped
}
diff --git a/pkg/front_end/testcases/general/await_complex.dart.weak.expect b/pkg/front_end/testcases/general/await_complex.dart.weak.expect
index df8fc27..20324c7 100644
--- a/pkg/front_end/testcases/general/await_complex.dart.weak.expect
+++ b/pkg/front_end/testcases/general/await_complex.dart.weak.expect
@@ -254,7 +254,7 @@
}
constants {
- #C1 = tearoff self::id
- #C2 = tearoff self::future
+ #C1 = static-tearoff self::id
+ #C2 = static-tearoff self::future
#C3 = 2
}
diff --git a/pkg/front_end/testcases/general/await_complex.dart.weak.transformed.expect b/pkg/front_end/testcases/general/await_complex.dart.weak.transformed.expect
index c35babf..087766ec 100644
--- a/pkg/front_end/testcases/general/await_complex.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/await_complex.dart.weak.transformed.expect
@@ -811,7 +811,7 @@
}
constants {
- #C1 = tearoff self::id
- #C2 = tearoff self::future
+ #C1 = static-tearoff self::id
+ #C2 = static-tearoff self::future
#C3 = 2
}
diff --git a/pkg/front_end/testcases/general/constants/various.dart.weak.expect b/pkg/front_end/testcases/general/constants/various.dart.weak.expect
index 8c8d29f..1cde25c 100644
--- a/pkg/front_end/testcases/general/constants/various.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/various.dart.weak.expect
@@ -621,8 +621,8 @@
#C18 = #I.Have.Dots
#C19 = self::ClassWithTypeArguments<core::int*, core::int*, core::int*> {}
#C20 = self::ClassWithTypeArguments<dynamic, dynamic, dynamic> {}
- #C21 = tearoff self::id1
- #C22 = partial-instantiation self::id1 <core::int*>
+ #C21 = static-tearoff self::id1
+ #C22 = instantiation self::id1 <core::int*>
}
diff --git a/pkg/front_end/testcases/general/constants/various.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/various.dart.weak.transformed.expect
index 6998464..f39f9ab 100644
--- a/pkg/front_end/testcases/general/constants/various.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/various.dart.weak.transformed.expect
@@ -621,8 +621,8 @@
#C18 = #I.Have.Dots
#C19 = self::ClassWithTypeArguments<core::int*, core::int*, core::int*> {}
#C20 = self::ClassWithTypeArguments<dynamic, dynamic, dynamic> {}
- #C21 = tearoff self::id1
- #C22 = partial-instantiation self::id1 <core::int*>
+ #C21 = static-tearoff self::id1
+ #C22 = instantiation self::id1 <core::int*>
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect
index 9b677e7..ce2a935 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect
@@ -232,7 +232,7 @@
#C38 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::A>?} #C9 : self::Subclass<self::A*>{(self::A{}) as{ForNonNullableByDefault} self::A*}
#C39 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
#C40 = TypeLiteralConstant((core::int*, {named: core::int*}) →* core::int*)
- #C41 = tearoff self::procedure
+ #C41 = static-tearoff self::procedure
#C42 = self::ConstClassWithF {foo:#C41}
#C43 = eval const core::bool::fromEnvironment(#C1)
#C44 = eval !const core::bool::fromEnvironment(#C1)
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect
index b2b5426..fef7a55 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect
@@ -232,7 +232,7 @@
#C38 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::A>?} #C9 : self::Subclass<self::A*>{(self::A{}) as{ForNonNullableByDefault} self::A*}
#C39 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
#C40 = TypeLiteralConstant((core::int*, {named: core::int*}) →* core::int*)
- #C41 = tearoff self::procedure
+ #C41 = static-tearoff self::procedure
#C42 = self::ConstClassWithF {foo:#C41}
#C43 = eval const core::bool::fromEnvironment(#C1)
#C44 = eval !const core::bool::fromEnvironment(#C1)
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.expect
index 65655e9..942009a 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.expect
@@ -103,8 +103,8 @@
constants {
#C1 = TypeLiteralConstant(core::Object*)
- #C2 = tearoff var::id1
- #C3 = partial-instantiation var::id1 <core::int*>
+ #C2 = static-tearoff var::id1
+ #C3 = instantiation var::id1 <core::int*>
#C4 = 0
#C5 = var::Class<core::int*> {field:#C4}
#C6 = 42
@@ -121,10 +121,10 @@
#C17 = null
#C18 = <dynamic, dynamic>{#C7:#C15, #C17:#C7)
#C19 = true
- #C20 = tearoff var::id2
+ #C20 = static-tearoff var::id2
#C21 = eval const core::identical(#C3, const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>)
#C22 = eval const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>
- #C23 = tearoff core::identical
+ #C23 = static-tearoff core::identical
}
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.transformed.expect
index 8f668a2..6a48cb7 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.transformed.expect
@@ -103,8 +103,8 @@
constants {
#C1 = TypeLiteralConstant(core::Object*)
- #C2 = tearoff var::id1
- #C3 = partial-instantiation var::id1 <core::int*>
+ #C2 = static-tearoff var::id1
+ #C3 = instantiation var::id1 <core::int*>
#C4 = 0
#C5 = var::Class<core::int*> {field:#C4}
#C6 = 42
@@ -121,11 +121,11 @@
#C17 = null
#C18 = <dynamic, dynamic>{#C7:#C15, #C17:#C7)
#C19 = true
- #C20 = tearoff var::id2
+ #C20 = static-tearoff var::id2
#C21 = eval const core::identical(#C3, const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>)
#C22 = eval const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>
#C23 = eval const core::identical(#C3, const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>)
- #C24 = tearoff core::identical
+ #C24 = static-tearoff core::identical
#C25 = eval const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>
}
diff --git a/pkg/front_end/testcases/general/external.dart.weak.expect b/pkg/front_end/testcases/general/external.dart.weak.expect
index ab78ddb..5e9b241 100644
--- a/pkg/front_end/testcases/general/external.dart.weak.expect
+++ b/pkg/front_end/testcases/general/external.dart.weak.expect
@@ -19,5 +19,5 @@
}
constants {
- #C1 = tearoff self::onData
+ #C1 = static-tearoff self::onData
}
diff --git a/pkg/front_end/testcases/general/external.dart.weak.transformed.expect b/pkg/front_end/testcases/general/external.dart.weak.transformed.expect
index ab78ddb..5e9b241 100644
--- a/pkg/front_end/testcases/general/external.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/external.dart.weak.transformed.expect
@@ -19,5 +19,5 @@
}
constants {
- #C1 = tearoff self::onData
+ #C1 = static-tearoff self::onData
}
diff --git a/pkg/front_end/testcases/general/function_type_assignments.dart.weak.expect b/pkg/front_end/testcases/general/function_type_assignments.dart.weak.expect
index 0d92c04..cc24e09 100644
--- a/pkg/front_end/testcases/general/function_type_assignments.dart.weak.expect
+++ b/pkg/front_end/testcases/general/function_type_assignments.dart.weak.expect
@@ -39,7 +39,7 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::identity
- #C2 = tearoff self::identityObject
- #C3 = tearoff self::identityList
+ #C1 = static-tearoff self::identity
+ #C2 = static-tearoff self::identityObject
+ #C3 = static-tearoff self::identityList
}
diff --git a/pkg/front_end/testcases/general/function_type_assignments.dart.weak.transformed.expect b/pkg/front_end/testcases/general/function_type_assignments.dart.weak.transformed.expect
index 0d92c04..cc24e09 100644
--- a/pkg/front_end/testcases/general/function_type_assignments.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/function_type_assignments.dart.weak.transformed.expect
@@ -39,7 +39,7 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::identity
- #C2 = tearoff self::identityObject
- #C3 = tearoff self::identityList
+ #C1 = static-tearoff self::identity
+ #C2 = static-tearoff self::identityObject
+ #C3 = static-tearoff self::identityList
}
diff --git a/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.expect b/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.expect
index 61a26ba..c406e1e 100644
--- a/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.expect
+++ b/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.expect
@@ -22,5 +22,5 @@
}
constants {
- #C1 = tearoff self::add
+ #C1 = static-tearoff self::add
}
diff --git a/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.transformed.expect b/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.transformed.expect
index 61a26ba..c406e1e 100644
--- a/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/generic_function_type_in_message.dart.weak.transformed.expect
@@ -22,5 +22,5 @@
}
constants {
- #C1 = tearoff self::add
+ #C1 = static-tearoff self::add
}
diff --git a/pkg/front_end/testcases/general/getter_call.dart.weak.expect b/pkg/front_end/testcases/general/getter_call.dart.weak.expect
index 9430786..bcf489c 100644
--- a/pkg/front_end/testcases/general/getter_call.dart.weak.expect
+++ b/pkg/front_end/testcases/general/getter_call.dart.weak.expect
@@ -176,12 +176,12 @@
}
constants {
- #C1 = tearoff self::method1
- #C2 = tearoff self::method2
- #C3 = tearoff self::method3
- #C4 = tearoff self::method4
- #C5 = tearoff self::method5
- #C6 = tearoff self::method6
- #C7 = tearoff self::method7
+ #C1 = static-tearoff self::method1
+ #C2 = static-tearoff self::method2
+ #C3 = static-tearoff self::method3
+ #C4 = static-tearoff self::method4
+ #C5 = static-tearoff self::method5
+ #C6 = static-tearoff self::method6
+ #C7 = static-tearoff self::method7
#C8 = 0
}
diff --git a/pkg/front_end/testcases/general/getter_call.dart.weak.transformed.expect b/pkg/front_end/testcases/general/getter_call.dart.weak.transformed.expect
index c9ab79c..1ff1cbc 100644
--- a/pkg/front_end/testcases/general/getter_call.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/getter_call.dart.weak.transformed.expect
@@ -176,13 +176,13 @@
}
constants {
- #C1 = tearoff self::method1
- #C2 = tearoff self::method2
- #C3 = tearoff self::method3
- #C4 = tearoff self::method4
- #C5 = tearoff self::method5
- #C6 = tearoff self::method6
- #C7 = tearoff self::method7
+ #C1 = static-tearoff self::method1
+ #C2 = static-tearoff self::method2
+ #C3 = static-tearoff self::method3
+ #C4 = static-tearoff self::method4
+ #C5 = static-tearoff self::method5
+ #C6 = static-tearoff self::method6
+ #C7 = static-tearoff self::method7
#C8 = 0
}
diff --git a/pkg/front_end/testcases/general/identical_instantiated_function_tearoffs.dart.weak.expect b/pkg/front_end/testcases/general/identical_instantiated_function_tearoffs.dart.weak.expect
index daf6f36..db34700 100644
--- a/pkg/front_end/testcases/general/identical_instantiated_function_tearoffs.dart.weak.expect
+++ b/pkg/front_end/testcases/general/identical_instantiated_function_tearoffs.dart.weak.expect
@@ -22,6 +22,6 @@
}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int*>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int*>
}
diff --git a/pkg/front_end/testcases/general/identical_instantiated_function_tearoffs.dart.weak.transformed.expect b/pkg/front_end/testcases/general/identical_instantiated_function_tearoffs.dart.weak.transformed.expect
index e0f574c..acbe826 100644
--- a/pkg/front_end/testcases/general/identical_instantiated_function_tearoffs.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/identical_instantiated_function_tearoffs.dart.weak.transformed.expect
@@ -22,8 +22,8 @@
}
constants {
- #C1 = tearoff self::id
- #C2 = partial-instantiation self::id <core::int*>
+ #C1 = static-tearoff self::id
+ #C2 = instantiation self::id <core::int*>
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/general/invalid_cast.dart.weak.expect b/pkg/front_end/testcases/general/invalid_cast.dart.weak.expect
index 95af468..e123159 100644
--- a/pkg/front_end/testcases/general/invalid_cast.dart.weak.expect
+++ b/pkg/front_end/testcases/general/invalid_cast.dart.weak.expect
@@ -169,6 +169,6 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::C::staticFunction
- #C2 = tearoff self::topLevelFunction
+ #C1 = static-tearoff self::C::staticFunction
+ #C2 = static-tearoff self::topLevelFunction
}
diff --git a/pkg/front_end/testcases/general/invalid_cast.dart.weak.transformed.expect b/pkg/front_end/testcases/general/invalid_cast.dart.weak.transformed.expect
index 7cd74f4..c4466eb 100644
--- a/pkg/front_end/testcases/general/invalid_cast.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/invalid_cast.dart.weak.transformed.expect
@@ -169,6 +169,6 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::C::staticFunction
- #C2 = tearoff self::topLevelFunction
+ #C1 = static-tearoff self::C::staticFunction
+ #C2 = static-tearoff self::topLevelFunction
}
diff --git a/pkg/front_end/testcases/general/type_of_null.dart.weak.expect b/pkg/front_end/testcases/general/type_of_null.dart.weak.expect
index 5387e91..4f0b860 100644
--- a/pkg/front_end/testcases/general/type_of_null.dart.weak.expect
+++ b/pkg/front_end/testcases/general/type_of_null.dart.weak.expect
@@ -23,5 +23,5 @@
}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/general/type_of_null.dart.weak.transformed.expect b/pkg/front_end/testcases/general/type_of_null.dart.weak.transformed.expect
index 5387e91..4f0b860 100644
--- a/pkg/front_end/testcases/general/type_of_null.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/type_of_null.dart.weak.transformed.expect
@@ -23,5 +23,5 @@
}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/general/typedef.dart.weak.expect b/pkg/front_end/testcases/general/typedef.dart.weak.expect
index 979f6c8..77eee56 100644
--- a/pkg/front_end/testcases/general/typedef.dart.weak.expect
+++ b/pkg/front_end/testcases/general/typedef.dart.weak.expect
@@ -12,5 +12,5 @@
}
constants {
- #C1 = tearoff self::main
+ #C1 = static-tearoff self::main
}
diff --git a/pkg/front_end/testcases/general/typedef.dart.weak.transformed.expect b/pkg/front_end/testcases/general/typedef.dart.weak.transformed.expect
index c1747f2..2bbbce2 100644
--- a/pkg/front_end/testcases/general/typedef.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/typedef.dart.weak.transformed.expect
@@ -12,7 +12,7 @@
}
constants {
- #C1 = tearoff self::main
+ #C1 = static-tearoff self::main
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.expect b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.expect
index 1b6e2a9..86bb196 100644
--- a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.expect
+++ b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.expect
@@ -21,5 +21,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.transformed.expect b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.transformed.expect
index 56b3959..4a42619 100644
--- a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.strong.transformed.expect
@@ -21,5 +21,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.expect b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.expect
index 1b6e2a9..86bb196 100644
--- a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.expect
+++ b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.expect
@@ -21,5 +21,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.transformed.expect b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.transformed.expect
index 56b3959..4a42619 100644
--- a/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.dart.weak.transformed.expect
@@ -21,5 +21,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/implicit_getter_calls/getter_call.dart.weak.expect b/pkg/front_end/testcases/implicit_getter_calls/getter_call.dart.weak.expect
index b258f3f..90a2cad 100644
--- a/pkg/front_end/testcases/implicit_getter_calls/getter_call.dart.weak.expect
+++ b/pkg/front_end/testcases/implicit_getter_calls/getter_call.dart.weak.expect
@@ -176,12 +176,12 @@
}
constants {
- #C1 = tearoff self::method1
- #C2 = tearoff self::method2
- #C3 = tearoff self::method3
- #C4 = tearoff self::method4
- #C5 = tearoff self::method5
- #C6 = tearoff self::method6
- #C7 = tearoff self::method7
+ #C1 = static-tearoff self::method1
+ #C2 = static-tearoff self::method2
+ #C3 = static-tearoff self::method3
+ #C4 = static-tearoff self::method4
+ #C5 = static-tearoff self::method5
+ #C6 = static-tearoff self::method6
+ #C7 = static-tearoff self::method7
#C8 = 0
}
diff --git a/pkg/front_end/testcases/implicit_getter_calls/getter_call.dart.weak.transformed.expect b/pkg/front_end/testcases/implicit_getter_calls/getter_call.dart.weak.transformed.expect
index 384940b..19a91a7 100644
--- a/pkg/front_end/testcases/implicit_getter_calls/getter_call.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/implicit_getter_calls/getter_call.dart.weak.transformed.expect
@@ -176,13 +176,13 @@
}
constants {
- #C1 = tearoff self::method1
- #C2 = tearoff self::method2
- #C3 = tearoff self::method3
- #C4 = tearoff self::method4
- #C5 = tearoff self::method5
- #C6 = tearoff self::method6
- #C7 = tearoff self::method7
+ #C1 = static-tearoff self::method1
+ #C2 = static-tearoff self::method2
+ #C3 = static-tearoff self::method3
+ #C4 = static-tearoff self::method4
+ #C5 = static-tearoff self::method5
+ #C6 = static-tearoff self::method6
+ #C7 = static-tearoff self::method7
#C8 = 0
}
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_17.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_17.yaml.world.1.expect
index 88cc8e1..1c3c19c 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_17.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_17.yaml.world.1.expect
@@ -17,5 +17,5 @@
return LoadLibrary(foo);
}
constants {
- #C1 = tearoff main::_#loadLibrary_foo
+ #C1 = static-tearoff main::_#loadLibrary_foo
}
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_17.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_17.yaml.world.2.expect
index 8edd69c..e3b1ce9 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_17.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_17.yaml.world.2.expect
@@ -18,5 +18,5 @@
return LoadLibrary(foo);
}
constants {
- #C1 = tearoff main::_#loadLibrary_foo
+ #C1 = static-tearoff main::_#loadLibrary_foo
}
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect
index 22e37ea..d6a452a 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect
@@ -543,6 +543,6 @@
#C3 = dart.core::pragma {name:#C1, options:#C2}
#C4 = ""
#C5 = true
- #C6 = tearoff dart.collection::ListMixin::_compareAny
+ #C6 = static-tearoff dart.collection::ListMixin::_compareAny
#C7 = 0
}
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect
index 22e37ea..d6a452a 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect
@@ -543,6 +543,6 @@
#C3 = dart.core::pragma {name:#C1, options:#C2}
#C4 = ""
#C5 = true
- #C6 = tearoff dart.collection::ListMixin::_compareAny
+ #C6 = static-tearoff dart.collection::ListMixin::_compareAny
#C7 = 0
}
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart.weak.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart.weak.expect
index a91da56..f1a6a23 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart.weak.expect
@@ -10,5 +10,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart.weak.transformed.expect
index a91da56..f1a6a23 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart.weak.transformed.expect
@@ -10,5 +10,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/bug30624.dart.weak.expect b/pkg/front_end/testcases/inference/bug30624.dart.weak.expect
index 679fdf5..d66aab0b 100644
--- a/pkg/front_end/testcases/inference/bug30624.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/bug30624.dart.weak.expect
@@ -44,5 +44,5 @@
constants {
#C1 = null
- #C2 = tearoff self::C::_default
+ #C2 = static-tearoff self::C::_default
}
diff --git a/pkg/front_end/testcases/inference/bug30624.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/bug30624.dart.weak.transformed.expect
index 9449aa55..02a85fc 100644
--- a/pkg/front_end/testcases/inference/bug30624.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/bug30624.dart.weak.transformed.expect
@@ -44,7 +44,7 @@
constants {
#C1 = null
- #C2 = tearoff self::C::_default
+ #C2 = static-tearoff self::C::_default
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.expect
index 706d512..3ed0854 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart.weak.expect
@@ -78,5 +78,5 @@
}
constants {
- #C1 = tearoff self::myF
+ #C1 = static-tearoff self::myF
}
diff --git a/pkg/front_end/testcases/inference/future_or_subtyping.dart.weak.expect b/pkg/front_end/testcases/inference/future_or_subtyping.dart.weak.expect
index 656a85c..36d60ee 100644
--- a/pkg/front_end/testcases/inference/future_or_subtyping.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/future_or_subtyping.dart.weak.expect
@@ -15,6 +15,6 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::add
- #C2 = tearoff self::add2
+ #C1 = static-tearoff self::add
+ #C2 = static-tearoff self::add2
}
diff --git a/pkg/front_end/testcases/inference/future_or_subtyping.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_or_subtyping.dart.weak.transformed.expect
index 656a85c..36d60ee 100644
--- a/pkg/front_end/testcases/inference/future_or_subtyping.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_or_subtyping.dart.weak.transformed.expect
@@ -15,6 +15,6 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::add
- #C2 = tearoff self::add2
+ #C1 = static-tearoff self::add
+ #C2 = static-tearoff self::add2
}
diff --git a/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.expect b/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.expect
index 19380c0..94fc7a3 100644
--- a/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.expect
@@ -10,5 +10,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.transformed.expect
index 19380c0..94fc7a3 100644
--- a/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_basic_downward_inference.dart.weak.transformed.expect
@@ -10,5 +10,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.expect b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.expect
index 2c7b116..e8a716a 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.expect
@@ -176,6 +176,6 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff math::max
- #C2 = tearoff math::min
+ #C1 = static-tearoff math::max
+ #C2 = static-tearoff math::min
}
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.transformed.expect
index 9dc6b9b..1ee8bea 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart.weak.transformed.expect
@@ -176,8 +176,8 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff math::max
- #C2 = tearoff math::min
+ #C1 = static-tearoff math::max
+ #C2 = static-tearoff math::min
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/inference/generic_methods_iterable_and_future.dart.weak.expect b/pkg/front_end/testcases/inference/generic_methods_iterable_and_future.dart.weak.expect
index 860faf4..fe91228 100644
--- a/pkg/front_end/testcases/inference/generic_methods_iterable_and_future.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_iterable_and_future.dart.weak.expect
@@ -34,5 +34,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::make
+ #C1 = static-tearoff self::make
}
diff --git a/pkg/front_end/testcases/inference/generic_methods_iterable_and_future.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_iterable_and_future.dart.weak.transformed.expect
index 99dc822..393b79d 100644
--- a/pkg/front_end/testcases/inference/generic_methods_iterable_and_future.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_iterable_and_future.dart.weak.transformed.expect
@@ -34,5 +34,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::make
+ #C1 = static-tearoff self::make
}
diff --git a/pkg/front_end/testcases/inference/generic_methods_nested_generic_instantiation.dart.weak.expect b/pkg/front_end/testcases/inference/generic_methods_nested_generic_instantiation.dart.weak.expect
index 34108a8..3d04d1f 100644
--- a/pkg/front_end/testcases/inference/generic_methods_nested_generic_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_nested_generic_instantiation.dart.weak.expect
@@ -44,5 +44,5 @@
}
constants {
- #C1 = tearoff math::max
+ #C1 = static-tearoff math::max
}
diff --git a/pkg/front_end/testcases/inference/generic_methods_nested_generic_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_nested_generic_instantiation.dart.weak.transformed.expect
index 8af73b0..b46e8a6 100644
--- a/pkg/front_end/testcases/inference/generic_methods_nested_generic_instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_nested_generic_instantiation.dart.weak.transformed.expect
@@ -44,7 +44,7 @@
}
constants {
- #C1 = tearoff math::max
+ #C1 = static-tearoff math::max
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.expect b/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.expect
index 5f6e2e6..d6bd505 100644
--- a/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.expect
@@ -30,5 +30,5 @@
constants {
#C1 = null
- #C2 = tearoff self::C::_compareAny
+ #C2 = static-tearoff self::C::_compareAny
}
diff --git a/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.transformed.expect
index 5f6e2e6..d6bd505 100644
--- a/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/greatest_closure_multiple_params.dart.weak.transformed.expect
@@ -30,5 +30,5 @@
constants {
#C1 = null
- #C2 = tearoff self::C::_compareAny
+ #C2 = static-tearoff self::C::_compareAny
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart.weak.expect b/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart.weak.expect
index b95e93b..6eef7cc 100644
--- a/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart.weak.expect
@@ -8,5 +8,5 @@
}
constants {
- #C1 = tearoff core::print
+ #C1 = static-tearoff core::print
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart.weak.transformed.expect
index b95e93b..6eef7cc 100644
--- a/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart.weak.transformed.expect
@@ -8,5 +8,5 @@
}
constants {
- #C1 = tearoff core::print
+ #C1 = static-tearoff core::print
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart.weak.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart.weak.expect
index 5fbc81e..21d3b06 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart.weak.expect
@@ -12,6 +12,6 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart.weak.transformed.expect
index 468a854..2e71da8 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart.weak.transformed.expect
@@ -12,6 +12,6 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart.weak.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart.weak.expect
index 5db9025..9be942f 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart.weak.expect
@@ -12,6 +12,6 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart.weak.transformed.expect
index 302d4f1..126d190 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart.weak.transformed.expect
@@ -12,6 +12,6 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart.weak.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart.weak.expect
index 7d05c01..0b7d047 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart.weak.expect
@@ -12,7 +12,7 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
#C3 = null
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart.weak.transformed.expect
index d3dbe88..ee21ab4 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart.weak.transformed.expect
@@ -12,7 +12,7 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
#C3 = null
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart.weak.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart.weak.expect
index 2eb4e4d..704ff597 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart.weak.expect
@@ -12,7 +12,7 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
#C3 = null
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart.weak.transformed.expect
index d9781ac..2e47f05 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart.weak.transformed.expect
@@ -12,7 +12,7 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
#C3 = null
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart.weak.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart.weak.expect
index 5a739ef..b495253 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart.weak.expect
@@ -12,6 +12,6 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart.weak.transformed.expect
index a8897a0..805ab2c 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart.weak.transformed.expect
@@ -12,6 +12,6 @@
}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::g
}
diff --git a/pkg/front_end/testcases/inference/instantiate_tearoff.dart.weak.expect b/pkg/front_end/testcases/inference/instantiate_tearoff.dart.weak.expect
index 41e2e41..5d83e0a 100644
--- a/pkg/front_end/testcases/inference/instantiate_tearoff.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/instantiate_tearoff.dart.weak.expect
@@ -44,6 +44,6 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::C::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::C::g
}
diff --git a/pkg/front_end/testcases/inference/instantiate_tearoff.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/instantiate_tearoff.dart.weak.transformed.expect
index 4c5080b..87decf1 100644
--- a/pkg/front_end/testcases/inference/instantiate_tearoff.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/instantiate_tearoff.dart.weak.transformed.expect
@@ -44,8 +44,8 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
- #C2 = tearoff self::C::g
+ #C1 = static-tearoff self::f
+ #C2 = static-tearoff self::C::g
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.weak.expect b/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.weak.expect
index af395c5..d6fb1da 100644
--- a/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.weak.expect
@@ -34,6 +34,6 @@
constants {
#C1 = 0
#C2 = <core::int*>[#C1]
- #C3 = tearoff self::optional_toplevel
- #C4 = tearoff self::named_toplevel
+ #C3 = static-tearoff self::optional_toplevel
+ #C4 = static-tearoff self::named_toplevel
}
diff --git a/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.weak.transformed.expect
index af395c5..d6fb1da 100644
--- a/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/parameter_defaults_upwards.dart.weak.transformed.expect
@@ -34,6 +34,6 @@
constants {
#C1 = 0
#C2 = <core::int*>[#C1]
- #C3 = tearoff self::optional_toplevel
- #C4 = tearoff self::named_toplevel
+ #C3 = static-tearoff self::optional_toplevel
+ #C4 = static-tearoff self::named_toplevel
}
diff --git a/pkg/front_end/testcases/inference/static_method_tear_off.dart.weak.expect b/pkg/front_end/testcases/inference/static_method_tear_off.dart.weak.expect
index 3a80563..b89fa7d 100644
--- a/pkg/front_end/testcases/inference/static_method_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/static_method_tear_off.dart.weak.expect
@@ -25,5 +25,5 @@
}
constants {
- #C1 = tearoff self::C::f
+ #C1 = static-tearoff self::C::f
}
diff --git a/pkg/front_end/testcases/inference/static_method_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/static_method_tear_off.dart.weak.transformed.expect
index 3a80563..b89fa7d 100644
--- a/pkg/front_end/testcases/inference/static_method_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/static_method_tear_off.dart.weak.transformed.expect
@@ -25,5 +25,5 @@
}
constants {
- #C1 = tearoff self::C::f
+ #C1 = static-tearoff self::C::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect
index c90ed22..1307281 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect
@@ -18,5 +18,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect
index 2c7a1d7..56348a9 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect
@@ -18,5 +18,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
index ca3de8b..a621378 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
@@ -12,5 +12,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
index 1124860..1da0ab0 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
@@ -12,5 +12,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect
index d25a131..f64ec974 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect
@@ -18,5 +18,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect
index 6d9032c..a98e49b 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect
@@ -18,5 +18,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
index 169486b..ccba70a 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
@@ -12,5 +12,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
index 633c890..e9a5c4e 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
@@ -12,5 +12,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.expect
index bce5804..fc22443 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.expect
@@ -11,5 +11,5 @@
return <self::f::T*>[g(){() →* self::f::T*}];
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.transformed.expect
index cb153d8..e7778dd 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr.dart.weak.transformed.expect
@@ -11,5 +11,5 @@
return core::_GrowableList::_literal1<self::f::T*>(g(){() →* self::f::T*});
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.expect
index 742f60c..432c8a0a 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.expect
@@ -11,5 +11,5 @@
return 1.0;
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.transformed.expect
index 742f60c..432c8a0a 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr.dart.weak.transformed.expect
@@ -11,5 +11,5 @@
return 1.0;
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.weak.expect b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.weak.expect
index f86a055..751e547 100644
--- a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.weak.expect
@@ -25,5 +25,5 @@
}
constants {
- #C1 = tearoff self::printRunning
+ #C1 = static-tearoff self::printRunning
}
diff --git a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.weak.transformed.expect
index f86a055..751e547 100644
--- a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.weak.transformed.expect
@@ -25,5 +25,5 @@
}
constants {
- #C1 = tearoff self::printRunning
+ #C1 = static-tearoff self::printRunning
}
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
index 169486b..ccba70a 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.expect
@@ -12,5 +12,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
index 633c890..e9a5c4e 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.weak.transformed.expect
@@ -12,5 +12,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
index 169486b..ccba70a 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.expect
@@ -12,5 +12,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
index 633c890..e9a5c4e 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.weak.transformed.expect
@@ -12,5 +12,5 @@
}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart.weak.expect b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart.weak.expect
index 7e0013f..96e59b9 100644
--- a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart.weak.expect
+++ b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart.weak.expect
@@ -15,5 +15,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::printRunning
+ #C1 = static-tearoff self::printRunning
}
diff --git a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart.weak.transformed.expect b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart.weak.transformed.expect
index 7e0013f..96e59b9 100644
--- a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart.weak.transformed.expect
@@ -15,5 +15,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::printRunning
+ #C1 = static-tearoff self::printRunning
}
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.strong.expect b/pkg/front_end/testcases/late_lowering/later.dart.strong.expect
index d5af00b..d80fa11 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.strong.expect
@@ -160,5 +160,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::fisk
+ #C1 = static-tearoff self::fisk
}
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/later.dart.strong.transformed.expect
index 95d50a9..d009196 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.strong.transformed.expect
@@ -265,7 +265,7 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::fisk
+ #C1 = static-tearoff self::fisk
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.weak.expect b/pkg/front_end/testcases/late_lowering/later.dart.weak.expect
index 00a9a68..0026c6b 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.weak.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.weak.expect
@@ -204,5 +204,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::fisk
+ #C1 = static-tearoff self::fisk
}
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/later.dart.weak.transformed.expect
index 7c57520..a808b23 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.weak.transformed.expect
@@ -309,5 +309,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::fisk
+ #C1 = static-tearoff self::fisk
}
diff --git a/pkg/front_end/testcases/nnbd/const_is.dart.strong.expect b/pkg/front_end/testcases/nnbd/const_is.dart.strong.expect
index ee9ce9b..1cece20 100644
--- a/pkg/front_end/testcases/nnbd/const_is.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/const_is.dart.strong.expect
@@ -96,11 +96,11 @@
#C2 = false
#C3 = null
#C4 = 1
- #C5 = tearoff self::f
- #C6 = tearoff self::g
- #C7 = tearoff self::f1
- #C8 = tearoff self::f2
- #C9 = tearoff self::f3
- #C10 = tearoff self::f4
- #C11 = tearoff self::f5
+ #C5 = static-tearoff self::f
+ #C6 = static-tearoff self::g
+ #C7 = static-tearoff self::f1
+ #C8 = static-tearoff self::f2
+ #C9 = static-tearoff self::f3
+ #C10 = static-tearoff self::f4
+ #C11 = static-tearoff self::f5
}
diff --git a/pkg/front_end/testcases/nnbd/const_is.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/const_is.dart.strong.transformed.expect
index 2eda141..55a7036 100644
--- a/pkg/front_end/testcases/nnbd/const_is.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/const_is.dart.strong.transformed.expect
@@ -96,13 +96,13 @@
#C2 = false
#C3 = null
#C4 = 1
- #C5 = tearoff self::f
- #C6 = tearoff self::g
- #C7 = tearoff self::f1
- #C8 = tearoff self::f2
- #C9 = tearoff self::f3
- #C10 = tearoff self::f4
- #C11 = tearoff self::f5
+ #C5 = static-tearoff self::f
+ #C6 = static-tearoff self::g
+ #C7 = static-tearoff self::f1
+ #C8 = static-tearoff self::f2
+ #C9 = static-tearoff self::f3
+ #C10 = static-tearoff self::f4
+ #C11 = static-tearoff self::f5
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/nnbd/const_is.dart.weak.expect b/pkg/front_end/testcases/nnbd/const_is.dart.weak.expect
index 7da3b8f..dcba0f8 100644
--- a/pkg/front_end/testcases/nnbd/const_is.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/const_is.dart.weak.expect
@@ -96,11 +96,11 @@
#C2 = false
#C3 = null
#C4 = 1
- #C5 = tearoff self::f
- #C6 = tearoff self::g
- #C7 = tearoff self::f1
- #C8 = tearoff self::f2
- #C9 = tearoff self::f3
- #C10 = tearoff self::f4
- #C11 = tearoff self::f5
+ #C5 = static-tearoff self::f
+ #C6 = static-tearoff self::g
+ #C7 = static-tearoff self::f1
+ #C8 = static-tearoff self::f2
+ #C9 = static-tearoff self::f3
+ #C10 = static-tearoff self::f4
+ #C11 = static-tearoff self::f5
}
diff --git a/pkg/front_end/testcases/nnbd/const_is.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/const_is.dart.weak.transformed.expect
index 67362a6..eda5d9f 100644
--- a/pkg/front_end/testcases/nnbd/const_is.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/const_is.dart.weak.transformed.expect
@@ -96,13 +96,13 @@
#C2 = false
#C3 = null
#C4 = 1
- #C5 = tearoff self::f
- #C6 = tearoff self::g
- #C7 = tearoff self::f1
- #C8 = tearoff self::f2
- #C9 = tearoff self::f3
- #C10 = tearoff self::f4
- #C11 = tearoff self::f5
+ #C5 = static-tearoff self::f
+ #C6 = static-tearoff self::g
+ #C7 = static-tearoff self::f1
+ #C8 = static-tearoff self::f2
+ #C9 = static-tearoff self::f3
+ #C10 = static-tearoff self::f4
+ #C11 = static-tearoff self::f5
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/nnbd/constants.dart.strong.expect b/pkg/front_end/testcases/nnbd/constants.dart.strong.expect
index d1fd5fe..70ed240 100644
--- a/pkg/front_end/testcases/nnbd/constants.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/constants.dart.strong.expect
@@ -89,8 +89,8 @@
constants {
#C1 = TypeLiteralConstant(core::Object)
- #C2 = tearoff con::id
- #C3 = partial-instantiation con::id <core::int>
+ #C2 = static-tearoff con::id
+ #C3 = instantiation con::id <core::int>
#C4 = 0
#C5 = con::Class<core::int> {field:#C4}
#C6 = TypeLiteralConstant((dynamic) → dynamic)
@@ -104,7 +104,7 @@
#C14 = <dynamic>[#C4, #C13]
#C15 = core::_ImmutableMap<core::int, core::String> {_kvPairs:#C14}
#C16 = true
- #C17 = tearoff core::identical
+ #C17 = static-tearoff core::identical
}
diff --git a/pkg/front_end/testcases/nnbd/constants.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/constants.dart.strong.transformed.expect
index d1fd5fe..70ed240 100644
--- a/pkg/front_end/testcases/nnbd/constants.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/constants.dart.strong.transformed.expect
@@ -89,8 +89,8 @@
constants {
#C1 = TypeLiteralConstant(core::Object)
- #C2 = tearoff con::id
- #C3 = partial-instantiation con::id <core::int>
+ #C2 = static-tearoff con::id
+ #C3 = instantiation con::id <core::int>
#C4 = 0
#C5 = con::Class<core::int> {field:#C4}
#C6 = TypeLiteralConstant((dynamic) → dynamic)
@@ -104,7 +104,7 @@
#C14 = <dynamic>[#C4, #C13]
#C15 = core::_ImmutableMap<core::int, core::String> {_kvPairs:#C14}
#C16 = true
- #C17 = tearoff core::identical
+ #C17 = static-tearoff core::identical
}
diff --git a/pkg/front_end/testcases/nnbd/constants.dart.weak.expect b/pkg/front_end/testcases/nnbd/constants.dart.weak.expect
index 3adb498..b26ca6d 100644
--- a/pkg/front_end/testcases/nnbd/constants.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/constants.dart.weak.expect
@@ -89,8 +89,8 @@
constants {
#C1 = TypeLiteralConstant(core::Object*)
- #C2 = tearoff con::id
- #C3 = partial-instantiation con::id <core::int*>
+ #C2 = static-tearoff con::id
+ #C3 = instantiation con::id <core::int*>
#C4 = 0
#C5 = con::Class<core::int*> {field:#C4}
#C6 = TypeLiteralConstant((dynamic) →* dynamic)
@@ -104,7 +104,7 @@
#C14 = <dynamic>[#C4, #C13]
#C15 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C14}
#C16 = true
- #C17 = tearoff core::identical
+ #C17 = static-tearoff core::identical
}
diff --git a/pkg/front_end/testcases/nnbd/constants.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/constants.dart.weak.transformed.expect
index 3adb498..b26ca6d 100644
--- a/pkg/front_end/testcases/nnbd/constants.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/constants.dart.weak.transformed.expect
@@ -89,8 +89,8 @@
constants {
#C1 = TypeLiteralConstant(core::Object*)
- #C2 = tearoff con::id
- #C3 = partial-instantiation con::id <core::int*>
+ #C2 = static-tearoff con::id
+ #C3 = instantiation con::id <core::int*>
#C4 = 0
#C5 = con::Class<core::int*> {field:#C4}
#C6 = TypeLiteralConstant((dynamic) →* dynamic)
@@ -104,7 +104,7 @@
#C14 = <dynamic>[#C4, #C13]
#C15 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C14}
#C16 = true
- #C17 = tearoff core::identical
+ #C17 = static-tearoff core::identical
}
diff --git a/pkg/front_end/testcases/nnbd/function_types.dart.strong.expect b/pkg/front_end/testcases/nnbd/function_types.dart.strong.expect
index 26e67a7..57a3b98 100644
--- a/pkg/front_end/testcases/nnbd/function_types.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/function_types.dart.strong.expect
@@ -36,5 +36,5 @@
}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/nnbd/function_types.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/function_types.dart.strong.transformed.expect
index 26e67a7..57a3b98 100644
--- a/pkg/front_end/testcases/nnbd/function_types.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/function_types.dart.strong.transformed.expect
@@ -36,5 +36,5 @@
}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/nnbd/function_types.dart.weak.expect b/pkg/front_end/testcases/nnbd/function_types.dart.weak.expect
index 26e67a7..57a3b98 100644
--- a/pkg/front_end/testcases/nnbd/function_types.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/function_types.dart.weak.expect
@@ -36,5 +36,5 @@
}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/nnbd/function_types.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/function_types.dart.weak.transformed.expect
index 26e67a7..57a3b98 100644
--- a/pkg/front_end/testcases/nnbd/function_types.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/function_types.dart.weak.transformed.expect
@@ -36,5 +36,5 @@
}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.strong.expect
index 2d7f2f7..81da4f2 100644
--- a/pkg/front_end/testcases/nnbd/issue42433.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.strong.expect
@@ -14,5 +14,5 @@
}
constants {
- #C1 = tearoff self::checkme
+ #C1 = static-tearoff self::checkme
}
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.strong.transformed.expect
index 62a035b..d4ca87d 100644
--- a/pkg/front_end/testcases/nnbd/issue42433.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.strong.transformed.expect
@@ -14,7 +14,7 @@
}
constants {
- #C1 = tearoff self::checkme
+ #C1 = static-tearoff self::checkme
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.weak.expect
index 2d7f2f7..81da4f2 100644
--- a/pkg/front_end/testcases/nnbd/issue42433.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.weak.expect
@@ -14,5 +14,5 @@
}
constants {
- #C1 = tearoff self::checkme
+ #C1 = static-tearoff self::checkme
}
diff --git a/pkg/front_end/testcases/nnbd/issue42433.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42433.dart.weak.transformed.expect
index 0fd30a8..005edee 100644
--- a/pkg/front_end/testcases/nnbd/issue42433.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue42433.dart.weak.transformed.expect
@@ -14,7 +14,7 @@
}
constants {
- #C1 = tearoff self::checkme
+ #C1 = static-tearoff self::checkme
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.expect
index 0bba0ad..5f9dc45 100644
--- a/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.expect
@@ -28,5 +28,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.transformed.expect
index 0bba0ad..5f9dc45 100644
--- a/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716b.dart.strong.transformed.expect
@@ -28,5 +28,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.expect
index 0bba0ad..5f9dc45 100644
--- a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.expect
@@ -28,5 +28,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.transformed.expect
index 0bba0ad..5f9dc45 100644
--- a/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue43716b.dart.weak.transformed.expect
@@ -28,5 +28,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::f
+ #C1 = static-tearoff self::f
}
diff --git a/pkg/front_end/testcases/nnbd/later.dart.strong.expect b/pkg/front_end/testcases/nnbd/later.dart.strong.expect
index 076e56c..d9880ad 100644
--- a/pkg/front_end/testcases/nnbd/later.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/later.dart.strong.expect
@@ -134,5 +134,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::fisk
+ #C1 = static-tearoff self::fisk
}
diff --git a/pkg/front_end/testcases/nnbd/later.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/later.dart.strong.transformed.expect
index 90b2c25..2885cb8 100644
--- a/pkg/front_end/testcases/nnbd/later.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/later.dart.strong.transformed.expect
@@ -246,5 +246,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::fisk
+ #C1 = static-tearoff self::fisk
}
diff --git a/pkg/front_end/testcases/nnbd/later.dart.weak.expect b/pkg/front_end/testcases/nnbd/later.dart.weak.expect
index 076e56c..d9880ad 100644
--- a/pkg/front_end/testcases/nnbd/later.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/later.dart.weak.expect
@@ -134,5 +134,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::fisk
+ #C1 = static-tearoff self::fisk
}
diff --git a/pkg/front_end/testcases/nnbd/later.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/later.dart.weak.transformed.expect
index 90b2c25..2885cb8 100644
--- a/pkg/front_end/testcases/nnbd/later.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/later.dart.weak.transformed.expect
@@ -246,5 +246,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::fisk
+ #C1 = static-tearoff self::fisk
}
diff --git a/pkg/front_end/testcases/nnbd/load_library.dart.strong.expect b/pkg/front_end/testcases/nnbd/load_library.dart.strong.expect
index 9513601..885e631 100644
--- a/pkg/front_end/testcases/nnbd/load_library.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/load_library.dart.strong.expect
@@ -15,5 +15,5 @@
return LoadLibrary(math);
constants {
- #C1 = tearoff self::_#loadLibrary_math
+ #C1 = static-tearoff self::_#loadLibrary_math
}
diff --git a/pkg/front_end/testcases/nnbd/load_library.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/load_library.dart.strong.transformed.expect
index 9513601..885e631 100644
--- a/pkg/front_end/testcases/nnbd/load_library.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/load_library.dart.strong.transformed.expect
@@ -15,5 +15,5 @@
return LoadLibrary(math);
constants {
- #C1 = tearoff self::_#loadLibrary_math
+ #C1 = static-tearoff self::_#loadLibrary_math
}
diff --git a/pkg/front_end/testcases/nnbd/load_library.dart.weak.expect b/pkg/front_end/testcases/nnbd/load_library.dart.weak.expect
index 9513601..885e631 100644
--- a/pkg/front_end/testcases/nnbd/load_library.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/load_library.dart.weak.expect
@@ -15,5 +15,5 @@
return LoadLibrary(math);
constants {
- #C1 = tearoff self::_#loadLibrary_math
+ #C1 = static-tearoff self::_#loadLibrary_math
}
diff --git a/pkg/front_end/testcases/nnbd/load_library.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/load_library.dart.weak.transformed.expect
index 9513601..885e631 100644
--- a/pkg/front_end/testcases/nnbd/load_library.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/load_library.dart.weak.transformed.expect
@@ -15,5 +15,5 @@
return LoadLibrary(math);
constants {
- #C1 = tearoff self::_#loadLibrary_math
+ #C1 = static-tearoff self::_#loadLibrary_math
}
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect
index 5612a60..e4d23f5 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect
@@ -225,8 +225,8 @@
constants {
#C1 = 3
- #C2 = tearoff self::idFunction
- #C3 = partial-instantiation self::idFunction <core::int>
+ #C2 = static-tearoff self::idFunction
+ #C3 = instantiation self::idFunction <core::int>
#C4 = 0
#C5 = self::Class<dynamic> {field:#C4}
#C6 = self::Class<core::num> {field:#C4}
@@ -244,13 +244,13 @@
#C18 = self::ClassWithList<core::int> {field:#C16}
#C19 = <core::String>[#C8]
#C20 = self::ClassWithList<core::String> {field:#C19}
- #C21 = tearoff self::dynamicFunction
+ #C21 = static-tearoff self::dynamicFunction
#C22 = self::ClassWithFunction<dynamic> {field:#C21}
#C23 = self::ClassWithFunction<core::Object?> {field:#C21}
- #C24 = tearoff self::objectFunction
+ #C24 = static-tearoff self::objectFunction
#C25 = self::ClassWithFunction<dynamic> {field:#C24}
#C26 = self::ClassWithFunction<void> {field:#C24}
- #C27 = tearoff self::intFunction
+ #C27 = static-tearoff self::intFunction
#C28 = self::ClassWithFunction<core::int> {field:#C27}
#C29 = self::ClassWithFunction<core::int> {field:#C3}
}
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect
index 5612a60..e4d23f5 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect
@@ -225,8 +225,8 @@
constants {
#C1 = 3
- #C2 = tearoff self::idFunction
- #C3 = partial-instantiation self::idFunction <core::int>
+ #C2 = static-tearoff self::idFunction
+ #C3 = instantiation self::idFunction <core::int>
#C4 = 0
#C5 = self::Class<dynamic> {field:#C4}
#C6 = self::Class<core::num> {field:#C4}
@@ -244,13 +244,13 @@
#C18 = self::ClassWithList<core::int> {field:#C16}
#C19 = <core::String>[#C8]
#C20 = self::ClassWithList<core::String> {field:#C19}
- #C21 = tearoff self::dynamicFunction
+ #C21 = static-tearoff self::dynamicFunction
#C22 = self::ClassWithFunction<dynamic> {field:#C21}
#C23 = self::ClassWithFunction<core::Object?> {field:#C21}
- #C24 = tearoff self::objectFunction
+ #C24 = static-tearoff self::objectFunction
#C25 = self::ClassWithFunction<dynamic> {field:#C24}
#C26 = self::ClassWithFunction<void> {field:#C24}
- #C27 = tearoff self::intFunction
+ #C27 = static-tearoff self::intFunction
#C28 = self::ClassWithFunction<core::int> {field:#C27}
#C29 = self::ClassWithFunction<core::int> {field:#C3}
}
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect
index ff4ef6e..8c2aa2a 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect
@@ -216,8 +216,8 @@
constants {
#C1 = 3
- #C2 = tearoff self::idFunction
- #C3 = partial-instantiation self::idFunction <core::int*>
+ #C2 = static-tearoff self::idFunction
+ #C3 = instantiation self::idFunction <core::int*>
#C4 = 0
#C5 = self::Class<dynamic> {field:#C4}
#C6 = self::Class<core::num*> {field:#C4}
@@ -235,13 +235,13 @@
#C18 = self::ClassWithList<core::int*> {field:#C16}
#C19 = <core::String*>[#C8]
#C20 = self::ClassWithList<core::String*> {field:#C19}
- #C21 = tearoff self::dynamicFunction
+ #C21 = static-tearoff self::dynamicFunction
#C22 = self::ClassWithFunction<dynamic> {field:#C21}
#C23 = self::ClassWithFunction<core::Object?> {field:#C21}
- #C24 = tearoff self::objectFunction
+ #C24 = static-tearoff self::objectFunction
#C25 = self::ClassWithFunction<dynamic> {field:#C24}
#C26 = self::ClassWithFunction<void> {field:#C24}
- #C27 = tearoff self::intFunction
+ #C27 = static-tearoff self::intFunction
#C28 = self::ClassWithFunction<core::int*> {field:#C27}
#C29 = self::ClassWithFunction<core::int*> {field:#C3}
#C30 = self::ClassWithFunction<core::Object*> {field:#C24}
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect
index ff4ef6e..8c2aa2a 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect
@@ -216,8 +216,8 @@
constants {
#C1 = 3
- #C2 = tearoff self::idFunction
- #C3 = partial-instantiation self::idFunction <core::int*>
+ #C2 = static-tearoff self::idFunction
+ #C3 = instantiation self::idFunction <core::int*>
#C4 = 0
#C5 = self::Class<dynamic> {field:#C4}
#C6 = self::Class<core::num*> {field:#C4}
@@ -235,13 +235,13 @@
#C18 = self::ClassWithList<core::int*> {field:#C16}
#C19 = <core::String*>[#C8]
#C20 = self::ClassWithList<core::String*> {field:#C19}
- #C21 = tearoff self::dynamicFunction
+ #C21 = static-tearoff self::dynamicFunction
#C22 = self::ClassWithFunction<dynamic> {field:#C21}
#C23 = self::ClassWithFunction<core::Object?> {field:#C21}
- #C24 = tearoff self::objectFunction
+ #C24 = static-tearoff self::objectFunction
#C25 = self::ClassWithFunction<dynamic> {field:#C24}
#C26 = self::ClassWithFunction<void> {field:#C24}
- #C27 = tearoff self::intFunction
+ #C27 = static-tearoff self::intFunction
#C28 = self::ClassWithFunction<core::int*> {field:#C27}
#C29 = self::ClassWithFunction<core::int*> {field:#C3}
#C30 = self::ClassWithFunction<core::Object*> {field:#C24}
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.expect
index c131260..f4b8262 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.expect
@@ -80,8 +80,8 @@
constants {
#C1 = 3
- #C2 = tearoff self::idFunction
- #C3 = partial-instantiation self::idFunction <core::int>
+ #C2 = static-tearoff self::idFunction
+ #C3 = instantiation self::idFunction <core::int>
#C4 = true
#C5 = self::Class<dynamic> {field:#C4}
#C6 = self::Class<core::num> {field:#C4}
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.transformed.expect
index c131260..f4b8262 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.strong.transformed.expect
@@ -80,8 +80,8 @@
constants {
#C1 = 3
- #C2 = tearoff self::idFunction
- #C3 = partial-instantiation self::idFunction <core::int>
+ #C2 = static-tearoff self::idFunction
+ #C3 = instantiation self::idFunction <core::int>
#C4 = true
#C5 = self::Class<dynamic> {field:#C4}
#C6 = self::Class<core::num> {field:#C4}
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.expect
index d959fa2..3391fa7 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.expect
@@ -80,8 +80,8 @@
constants {
#C1 = 3
- #C2 = tearoff self::idFunction
- #C3 = partial-instantiation self::idFunction <core::int*>
+ #C2 = static-tearoff self::idFunction
+ #C3 = instantiation self::idFunction <core::int*>
#C4 = true
#C5 = self::Class<dynamic> {field:#C4}
#C6 = self::Class<core::num*> {field:#C4}
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.transformed.expect
index d959fa2..3391fa7 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_is.dart.weak.transformed.expect
@@ -80,8 +80,8 @@
constants {
#C1 = 3
- #C2 = tearoff self::idFunction
- #C3 = partial-instantiation self::idFunction <core::int*>
+ #C2 = static-tearoff self::idFunction
+ #C3 = instantiation self::idFunction <core::int*>
#C4 = true
#C5 = self::Class<dynamic> {field:#C4}
#C6 = self::Class<core::num*> {field:#C4}
diff --git a/pkg/front_end/testcases/nnbd_mixed/call_opt_in_through_opt_out.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/call_opt_in_through_opt_out.dart.weak.expect
index 496eb80..524b85c 100644
--- a/pkg/front_end/testcases/nnbd_mixed/call_opt_in_through_opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/call_opt_in_through_opt_out.dart.weak.expect
@@ -43,9 +43,9 @@
static method applyTakesNonNullableNamed({required (core::int) → void f = #C5}) → dynamic {}
constants {
- #C1 = tearoff cal::takesNever
- #C2 = tearoff cal::takesNull
- #C3 = tearoff cal::takesNonNullable
- #C4 = tearoff cal::takesNullable
+ #C1 = static-tearoff cal::takesNever
+ #C2 = static-tearoff cal::takesNull
+ #C3 = static-tearoff cal::takesNonNullable
+ #C4 = static-tearoff cal::takesNullable
#C5 = null
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/call_opt_in_through_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/call_opt_in_through_opt_out.dart.weak.transformed.expect
index 496eb80..524b85c 100644
--- a/pkg/front_end/testcases/nnbd_mixed/call_opt_in_through_opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/call_opt_in_through_opt_out.dart.weak.transformed.expect
@@ -43,9 +43,9 @@
static method applyTakesNonNullableNamed({required (core::int) → void f = #C5}) → dynamic {}
constants {
- #C1 = tearoff cal::takesNever
- #C2 = tearoff cal::takesNull
- #C3 = tearoff cal::takesNonNullable
- #C4 = tearoff cal::takesNullable
+ #C1 = static-tearoff cal::takesNever
+ #C2 = static-tearoff cal::takesNull
+ #C3 = static-tearoff cal::takesNonNullable
+ #C4 = static-tearoff cal::takesNullable
#C5 = null
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.expect
index ce1ca58..b684e03a 100644
--- a/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.expect
@@ -27,7 +27,7 @@
return null;
constants {
- #C1 = tearoff self2::fnWithNonNullObjectBound
+ #C1 = static-tearoff self2::fnWithNonNullObjectBound
#C2 = true
- #C3 = tearoff self2::fnWithNullBound
+ #C3 = static-tearoff self2::fnWithNullBound
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.transformed.expect
index 806f867..37ae0a7 100644
--- a/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/const_is.dart.weak.transformed.expect
@@ -27,9 +27,9 @@
return null;
constants {
- #C1 = tearoff self2::fnWithNonNullObjectBound
+ #C1 = static-tearoff self2::fnWithNonNullObjectBound
#C2 = true
- #C3 = tearoff self2::fnWithNullBound
+ #C3 = static-tearoff self2::fnWithNullBound
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.expect
index 22db152..fc18272 100644
--- a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.expect
@@ -81,8 +81,8 @@
return t;
constants {
- #C1 = tearoff con::id
- #C2 = partial-instantiation con::id <core::int*>
+ #C1 = static-tearoff con::id
+ #C2 = instantiation con::id <core::int*>
#C3 = 0
#C4 = con::Class<core::int*> {field:#C3}
#C5 = <core::int*>[#C3]
@@ -94,7 +94,7 @@
#C11 = <dynamic>[#C3, #C10]
#C12 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C11}
#C13 = true
- #C14 = tearoff core::identical
+ #C14 = static-tearoff core::identical
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.transformed.expect
index 22db152..fc18272 100644
--- a/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/constants.dart.weak.transformed.expect
@@ -81,8 +81,8 @@
return t;
constants {
- #C1 = tearoff con::id
- #C2 = partial-instantiation con::id <core::int*>
+ #C1 = static-tearoff con::id
+ #C2 = instantiation con::id <core::int*>
#C3 = 0
#C4 = con::Class<core::int*> {field:#C3}
#C5 = <core::int*>[#C3]
@@ -94,7 +94,7 @@
#C11 = <dynamic>[#C3, #C10]
#C12 = core::_ImmutableMap<core::int*, core::String*> {_kvPairs:#C11}
#C13 = true
- #C14 = tearoff core::identical
+ #C14 = static-tearoff core::identical
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41435.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue41435.dart.weak.expect
index bcfdbf4..5d1e11f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue41435.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue41435.dart.weak.expect
@@ -24,5 +24,5 @@
static method takesTakesNull((Null) → void f) → void {}
constants {
- #C1 = tearoff iss::takesNever
+ #C1 = static-tearoff iss::takesNever
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41435.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue41435.dart.weak.transformed.expect
index bcfdbf4..5d1e11f 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue41435.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue41435.dart.weak.transformed.expect
@@ -24,5 +24,5 @@
static method takesTakesNull((Null) → void f) → void {}
constants {
- #C1 = tearoff iss::takesNever
+ #C1 = static-tearoff iss::takesNever
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.expect
index 8d0b35b..9f64aae 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.expect
@@ -28,5 +28,5 @@
typedef F = (core::int*) →* core::int*;
constants {
- #C1 = tearoff self::f1
+ #C1 = static-tearoff self::f1
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.transformed.expect
index c100d45..c2af5e9 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42181.dart.weak.transformed.expect
@@ -28,5 +28,5 @@
typedef F = (core::int*) →* core::int*;
constants {
- #C1 = tearoff self::f1
+ #C1 = static-tearoff self::f1
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect
index 10c6848..3376fa8 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.expect
@@ -61,5 +61,5 @@
return 4;
constants {
- #C1 = tearoff iss::f
+ #C1 = static-tearoff iss::f
}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.transformed.expect
index 10c6848..3376fa8 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42660.dart.weak.transformed.expect
@@ -61,5 +61,5 @@
return 4;
constants {
- #C1 = tearoff iss::f
+ #C1 = static-tearoff iss::f
}
diff --git a/pkg/front_end/testcases/none/property_get.dart.strong.expect b/pkg/front_end/testcases/none/property_get.dart.strong.expect
index 4163115..e7de58d 100644
--- a/pkg/front_end/testcases/none/property_get.dart.strong.expect
+++ b/pkg/front_end/testcases/none/property_get.dart.strong.expect
@@ -144,6 +144,6 @@
constants {
#C1 = "foo"
#C2 = 3
- #C3 = tearoff self::Class1::staticMethod
- #C4 = tearoff self::topLevelMethod
+ #C3 = static-tearoff self::Class1::staticMethod
+ #C4 = static-tearoff self::topLevelMethod
}
diff --git a/pkg/front_end/testcases/none/property_get.dart.weak.expect b/pkg/front_end/testcases/none/property_get.dart.weak.expect
index fcb468d..83e1366 100644
--- a/pkg/front_end/testcases/none/property_get.dart.weak.expect
+++ b/pkg/front_end/testcases/none/property_get.dart.weak.expect
@@ -145,6 +145,6 @@
constants {
#C1 = "foo"
#C2 = 3
- #C3 = tearoff self::Class1::staticMethod
- #C4 = tearoff self::topLevelMethod
+ #C3 = static-tearoff self::Class1::staticMethod
+ #C4 = static-tearoff self::topLevelMethod
}
diff --git a/pkg/front_end/testcases/rasta/deferred_load.dart.weak.expect b/pkg/front_end/testcases/rasta/deferred_load.dart.weak.expect
index 0c092f0..d01ac3d 100644
--- a/pkg/front_end/testcases/rasta/deferred_load.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/deferred_load.dart.weak.expect
@@ -18,5 +18,5 @@
return null;
constants {
- #C1 = tearoff self::_#loadLibrary_lib
+ #C1 = static-tearoff self::_#loadLibrary_lib
}
diff --git a/pkg/front_end/testcases/rasta/deferred_load.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/deferred_load.dart.weak.transformed.expect
index 0c092f0..d01ac3d 100644
--- a/pkg/front_end/testcases/rasta/deferred_load.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/deferred_load.dart.weak.transformed.expect
@@ -18,5 +18,5 @@
return null;
constants {
- #C1 = tearoff self::_#loadLibrary_lib
+ #C1 = static-tearoff self::_#loadLibrary_lib
}
diff --git a/pkg/front_end/testcases/rasta/static.dart.weak.expect b/pkg/front_end/testcases/rasta/static.dart.weak.expect
index 79e268c..e32deba4 100644
--- a/pkg/front_end/testcases/rasta/static.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/static.dart.weak.expect
@@ -335,5 +335,5 @@
constants {
#C1 = 42
- #C2 = tearoff self::Foo::staticFunction
+ #C2 = static-tearoff self::Foo::staticFunction
}
diff --git a/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect
index f510042..6e667ff 100644
--- a/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect
@@ -335,7 +335,7 @@
constants {
#C1 = 42
- #C2 = tearoff self::Foo::staticFunction
+ #C2 = static-tearoff self::Foo::staticFunction
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/regress/issue_30838.dart.weak.expect b/pkg/front_end/testcases/regress/issue_30838.dart.weak.expect
index a71fae5..f1431a1 100644
--- a/pkg/front_end/testcases/regress/issue_30838.dart.weak.expect
+++ b/pkg/front_end/testcases/regress/issue_30838.dart.weak.expect
@@ -32,5 +32,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
diff --git a/pkg/front_end/testcases/regress/issue_30838.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_30838.dart.weak.transformed.expect
index acb1618..d1bd2c9 100644
--- a/pkg/front_end/testcases/regress/issue_30838.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_30838.dart.weak.transformed.expect
@@ -32,7 +32,7 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::foo
+ #C1 = static-tearoff self::foo
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/regress/issue_31846.dart.weak.expect b/pkg/front_end/testcases/regress/issue_31846.dart.weak.expect
index 0966591..450ca19 100644
--- a/pkg/front_end/testcases/regress/issue_31846.dart.weak.expect
+++ b/pkg/front_end/testcases/regress/issue_31846.dart.weak.expect
@@ -13,5 +13,5 @@
}
constants {
- #C1 = tearoff self::main
+ #C1 = static-tearoff self::main
}
diff --git a/pkg/front_end/testcases/regress/issue_31846.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_31846.dart.weak.transformed.expect
index 1a1cf76..34ce0c6 100644
--- a/pkg/front_end/testcases/regress/issue_31846.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_31846.dart.weak.transformed.expect
@@ -13,7 +13,7 @@
}
constants {
- #C1 = tearoff self::main
+ #C1 = static-tearoff self::main
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/regress/issue_39682.dart.weak.expect b/pkg/front_end/testcases/regress/issue_39682.dart.weak.expect
index 9ab919a..9866587 100644
--- a/pkg/front_end/testcases/regress/issue_39682.dart.weak.expect
+++ b/pkg/front_end/testcases/regress/issue_39682.dart.weak.expect
@@ -25,5 +25,5 @@
}
constants {
- #C1 = tearoff self::_#loadLibrary_foo
+ #C1 = static-tearoff self::_#loadLibrary_foo
}
diff --git a/pkg/front_end/testcases/regress/issue_39682.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_39682.dart.weak.transformed.expect
index 9ab919a..9866587 100644
--- a/pkg/front_end/testcases/regress/issue_39682.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_39682.dart.weak.transformed.expect
@@ -25,5 +25,5 @@
}
constants {
- #C1 = tearoff self::_#loadLibrary_foo
+ #C1 = static-tearoff self::_#loadLibrary_foo
}
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_tear_off.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_tear_off.dart.weak.expect
index 28fb659..3f796f1 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_tear_off.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_tear_off.dart.weak.expect
@@ -34,5 +34,5 @@
static method main() → void {}
constants {
- #C1 = tearoff self::h
+ #C1 = static-tearoff self::h
}
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_tear_off.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_tear_off.dart.weak.transformed.expect
index 28fb659..3f796f1 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_tear_off.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_tear_off.dart.weak.transformed.expect
@@ -34,5 +34,5 @@
static method main() → void {}
constants {
- #C1 = tearoff self::h
+ #C1 = static-tearoff self::h
}
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_of_getter.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_of_getter.dart.weak.expect
index 14294a1..204effc 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_of_getter.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_of_getter.dart.weak.expect
@@ -28,5 +28,5 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::h
+ #C1 = static-tearoff self::h
}
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_of_getter.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_of_getter.dart.weak.transformed.expect
index bde2247..14d1ec2 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_of_getter.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_of_getter.dart.weak.transformed.expect
@@ -28,7 +28,7 @@
static method main() → dynamic {}
constants {
- #C1 = tearoff self::h
+ #C1 = static-tearoff self::h
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.weak.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.weak.expect
index 889de80..378a300 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.weak.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.weak.expect
@@ -94,6 +94,6 @@
}
constants {
- #C1 = tearoff self::numToInt
- #C2 = tearoff self::numToNum
+ #C1 = static-tearoff self::numToInt
+ #C2 = static-tearoff self::numToNum
}
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.weak.transformed.expect
index 4fec92e..92acd28 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast.dart.weak.transformed.expect
@@ -94,8 +94,8 @@
}
constants {
- #C1 = tearoff self::numToInt
- #C2 = tearoff self::numToNum
+ #C1 = static-tearoff self::numToInt
+ #C2 = static-tearoff self::numToNum
}
Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 6b4d01c..cfb0715 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -8,7 +8,6 @@
dart2js/late_statics: SemiFuzzFailure # dartbug.com/45854
-constructor_tearoffs/instantiation: TypeCheckError
constructor_tearoffs/redirecting_constructors: RuntimeError
extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
extension_types/issue45775: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index e60499f..82cb3b9 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -9,10 +9,10 @@
constructor_tearoffs/abstract_class_constructor_tear_off: TextSerializationFailure
constructor_tearoffs/generic_tearoff_with_context: TextSerializationFailure
constructor_tearoffs/generic_tearoff_without_context: TextSerializationFailure
-constructor_tearoffs/instantiation: TypeCheckError
+constructor_tearoffs/instantiation: TextSerializationFailure
constructor_tearoffs/nongeneric_tearoff_with_context: TextSerializationFailure
constructor_tearoffs/nongeneric_tearoff_without_context: TextSerializationFailure
-constructor_tearoffs/redirecting_constructors: TextSerializationFailure
+constructor_tearoffs/redirecting_constructors: RuntimeError
constructor_tearoffs/typedef_tearoffs: TextSerializationFailure
constructor_tearoffs/unnamed_constructor: TextSerializationFailure
extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index d2ea6a0..82c2ba6 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -11,7 +11,6 @@
regress/utf_16_le_content.crash: SemiFuzzCrash
dart2js/late_statics: SemiFuzzFailure # dartbug.com/45854
-constructor_tearoffs/instantiation: TypeCheckError
constructor_tearoffs/redirecting_constructors: RuntimeError
extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
extension_types/issue45775: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 03628bb..667092c 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -3386,6 +3386,14 @@
/// resulting function type is generic, a fresh set of type parameters is used
/// in it.
FunctionType computeFunctionType(Nullability nullability) {
+ TreeNode? parent = this.parent;
+ List<TypeParameter> typeParameters;
+ if (parent is Constructor) {
+ assert(this.typeParameters.isEmpty);
+ typeParameters = parent.enclosingClass.typeParameters;
+ } else {
+ typeParameters = this.typeParameters;
+ }
return typeParameters.isEmpty
? computeThisFunctionType(nullability)
: getFreshTypeParameters(typeParameters)
@@ -13028,7 +13036,7 @@
int get hashCode => targetReference.hashCode;
bool operator ==(Object other) {
- return other is StaticTearOffConstant &&
+ return other is ConstructorTearOffConstant &&
other.targetReference == targetReference;
}
@@ -13079,7 +13087,7 @@
int get hashCode => targetReference.hashCode;
bool operator ==(Object other) {
- return other is StaticTearOffConstant &&
+ return other is RedirectingFactoryTearOffConstant &&
other.targetReference == targetReference;
}
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 7f610ca..b6b135c 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -446,8 +446,8 @@
}
Constant _readInstantiationConstant() {
- final StaticTearOffConstant tearOffConstant =
- readConstantReference() as StaticTearOffConstant;
+ final TearOffConstant tearOffConstant =
+ readConstantReference() as TearOffConstant;
final List<DartType> types = readDartTypeList();
return new InstantiationConstant(tearOffConstant, types);
}
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 7690d8c..837bfc7 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -2674,7 +2674,7 @@
writeIndentation();
writeConstantReference(node);
writeSpaced('=');
- writeWord('partial-instantiation');
+ writeWord('instantiation');
writeSpace();
writeMemberReferenceFromReference(node.tearOffConstant.targetReference);
writeSpace();
@@ -2695,7 +2695,7 @@
writeIndentation();
writeConstantReference(node);
writeSpaced('=');
- writeWord('tearoff');
+ writeWord('static-tearoff');
writeSpace();
writeMemberReferenceFromReference(node.targetReference);
endLine();
@@ -2711,6 +2711,16 @@
endLine();
}
+ visitConstructorTearOffConstant(ConstructorTearOffConstant node) {
+ writeIndentation();
+ writeConstantReference(node);
+ writeSpaced('=');
+ writeWord('constructor-tearoff');
+ writeSpace();
+ writeMemberReferenceFromReference(node.targetReference);
+ endLine();
+ }
+
defaultNode(Node node) {
write('<${node.runtimeType}>');
}
diff --git a/pkg/kernel/test/constant_equals_test.dart b/pkg/kernel/test/constant_equals_test.dart
index 689ae71..8674576 100644
--- a/pkg/kernel/test/constant_equals_test.dart
+++ b/pkg/kernel/test/constant_equals_test.dart
@@ -33,10 +33,29 @@
fileUri: uri,
isStatic: true);
+ Class cls = new Class(name: 'Class', fileUri: uri);
+ Procedure factory = new Procedure(
+ new Name('foo'), ProcedureKind.Factory, new FunctionNode(null),
+ fileUri: uri, isStatic: true);
+ cls.addProcedure(factory);
+ Constructor constructor = new Constructor(new FunctionNode(null),
+ name: new Name('foo'), fileUri: uri);
+ cls.addConstructor(constructor);
+ Procedure redirectingFactory = new Procedure(
+ new Name('foo'), ProcedureKind.Factory, new FunctionNode(null),
+ fileUri: uri, isStatic: true)
+ ..isRedirectingFactory = true;
+ cls.addProcedure(redirectingFactory);
+
TearOffConstant tearOffConstant1a = new StaticTearOffConstant(procedure1);
TearOffConstant tearOffConstant1b = new StaticTearOffConstant(procedure1);
TearOffConstant tearOffConstant2 = new StaticTearOffConstant(procedure2);
TearOffConstant tearOffConstant3 = new StaticTearOffConstant(procedure3);
+ TearOffConstant tearOffConstant4 =
+ new ConstructorTearOffConstant(constructor);
+ TearOffConstant tearOffConstant5 = new ConstructorTearOffConstant(factory);
+ TearOffConstant tearOffConstant6 =
+ new RedirectingFactoryTearOffConstant(redirectingFactory);
// foo() {}
// const a = foo;
@@ -161,5 +180,13 @@
[typeParameter2a, typeParameter2b],
tearOffConstant3,
[new TypeParameterType(typeParameter2b, Nullability.nullable)]));
+
+ testEquals(tearOffConstant4, tearOffConstant4);
+ testEquals(tearOffConstant5, tearOffConstant5);
+ testEquals(tearOffConstant6, tearOffConstant6);
+
+ testNotEquals(tearOffConstant4, tearOffConstant5);
+ testNotEquals(tearOffConstant4, tearOffConstant6);
+ testNotEquals(tearOffConstant5, tearOffConstant6);
}
}
diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart
index 07a1b8c..20cd144 100644
--- a/pkg/vm/lib/target/vm.dart
+++ b/pkg/vm/lib/target/vm.dart
@@ -166,7 +166,7 @@
} else {
// Transform @FfiNative(..) functions into ffi native call functions.
transformFfiNative.transformLibraries(
- component, libraries, referenceFromIndex);
+ component, libraries, diagnosticReporter, referenceFromIndex);
logger?.call("Transformed ffi natives");
// TODO(jensj/dacoharkes): We can probably limit the transformations to
// libraries that transitivley depend on dart:ffi.
diff --git a/pkg/vm/lib/transformations/ffi_native.dart b/pkg/vm/lib/transformations/ffi_native.dart
index 945f66e..76c25d0 100644
--- a/pkg/vm/lib/transformations/ffi_native.dart
+++ b/pkg/vm/lib/transformations/ffi_native.dart
@@ -8,17 +8,22 @@
import 'package:kernel/library_index.dart' show LibraryIndex;
import 'package:kernel/reference_from_index.dart'
show IndexedLibrary, ReferenceFromIndex;
+import 'package:kernel/target/targets.dart' show DiagnosticReporter;
+import 'package:front_end/src/api_unstable/vm.dart'
+ show messageFfiNativeAnnotationMustAnnotateStatic;
/// Transform @FfiNative annotated functions into FFI native function pointer
/// functions.
void transformLibraries(Component component, List<Library> libraries,
+ DiagnosticReporter diagnosticReporter,
ReferenceFromIndex? referenceFromIndex) {
final index = LibraryIndex(component, ['dart:ffi']);
// Skip if dart:ffi isn't loaded (e.g. during incremental compile).
if (index.tryGetClass('dart:ffi', 'FfiNative') == null) {
return;
}
- final transformer = FfiNativeTransformer(index, referenceFromIndex);
+ final transformer = FfiNativeTransformer(index, diagnosticReporter,
+ referenceFromIndex);
libraries.forEach(transformer.visitLibrary);
}
@@ -26,6 +31,7 @@
Library? currentLibrary;
IndexedLibrary? currentLibraryIndex;
+ final DiagnosticReporter diagnosticReporter;
final ReferenceFromIndex? referenceFromIndex;
final Class ffiNativeClass;
final Class nativeFunctionClass;
@@ -35,7 +41,8 @@
final Procedure asFunctionProcedure;
final Procedure fromAddressInternal;
- FfiNativeTransformer(LibraryIndex index, this.referenceFromIndex)
+ FfiNativeTransformer(LibraryIndex index, this.diagnosticReporter,
+ this.referenceFromIndex)
: ffiNativeClass = index.getClass('dart:ffi', 'FfiNative'),
nativeFunctionClass = index.getClass('dart:ffi', 'NativeFunction'),
ffiNativeNameField =
@@ -53,10 +60,9 @@
assert(currentLibrary == null);
currentLibrary = node;
currentLibraryIndex = referenceFromIndex?.lookupLibrary(node);
- // We only transform top-level, external procedures:
- transformList(node.procedures, node);
+ final result = super.visitLibrary(node);
currentLibrary = null;
- return node;
+ return result;
}
InstanceConstant? _tryGetFfiNativeAnnotation(Member node) {
@@ -162,6 +168,14 @@
return node;
}
+ if (!node.isStatic) {
+ diagnosticReporter.report(
+ messageFfiNativeAnnotationMustAnnotateStatic,
+ node.fileOffset,
+ 1,
+ node.location!.file);
+ }
+
node.isExternal = false;
node.function.body = transformFfiNative(node, ffiNativeAnnotation)
..parent = node.function;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
index f657ded..f360e5e 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
@@ -132,7 +132,7 @@
#C13 = 8
#C14 = 4
#C15 = <core::int*>[#C13, #C14, #C14]
- #C16 = tearoff self::useStruct3
- #C17 = tearoff self::returnStruct7
+ #C16 = static-tearoff self::useStruct3
+ #C17 = static-tearoff self::returnStruct7
#C18 = 1
}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
index 90996865..7317c7f3 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
@@ -65,5 +65,5 @@
new self::D::•();
}
constants {
- #C1 = tearoff self::func2
+ #C1 = static-tearoff self::func2
}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect
index d1e617c0..61123f8 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect
@@ -133,9 +133,9 @@
}
constants {
#C1 = false
- #C2 = tearoff self::BarKeep::create
- #C3 = tearoff self::HasKeep::create
- #C4 = tearoff self::ClearKeep::create
+ #C2 = static-tearoff self::BarKeep::create
+ #C3 = static-tearoff self::HasKeep::create
+ #C4 = static-tearoff self::ClearKeep::create
#C5 = "dart2js:noInline"
#C6 = null
#C7 = core::pragma {name:#C5, options:#C6}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect
index 7b743f8..7bbb164 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect
@@ -114,10 +114,10 @@
}
constants {
#C1 = false
- #C2 = tearoff self::FooKeep::create
- #C3 = tearoff self::BarKeep::create
- #C4 = tearoff self::HasKeep::create
- #C5 = tearoff self::ClearKeep::create
+ #C2 = static-tearoff self::FooKeep::create
+ #C3 = static-tearoff self::BarKeep::create
+ #C4 = static-tearoff self::HasKeep::create
+ #C5 = static-tearoff self::ClearKeep::create
#C6 = "dart2js:noInline"
#C7 = null
#C8 = core::pragma {name:#C6, options:#C7}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect
index 4b3811a..659128b 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect
@@ -164,10 +164,10 @@
}
constants {
#C1 = false
- #C2 = tearoff self::BarKeep::create
- #C3 = tearoff self::ZopDrop::create
- #C4 = tearoff self::HasKeep::create
- #C5 = tearoff self::ClearKeep::create
+ #C2 = static-tearoff self::BarKeep::create
+ #C3 = static-tearoff self::ZopDrop::create
+ #C4 = static-tearoff self::HasKeep::create
+ #C5 = static-tearoff self::ClearKeep::create
#C6 = "dart2js:noInline"
#C7 = null
#C8 = core::pragma {name:#C6, options:#C7}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect
index aec44f7..05303d3 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect
@@ -136,9 +136,9 @@
}
constants {
#C1 = false
- #C2 = tearoff self::BarKeep::create
- #C3 = tearoff self::HasKeep::create
- #C4 = tearoff self::ClearKeep::create
+ #C2 = static-tearoff self::BarKeep::create
+ #C3 = static-tearoff self::HasKeep::create
+ #C4 = static-tearoff self::ClearKeep::create
#C5 = "dart2js:noInline"
#C6 = null
#C7 = core::pragma {name:#C5, options:#C6}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/name_mangling_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/name_mangling_test.dart.expect
index fb4225c..bc4814f 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/name_mangling_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/name_mangling_test.dart.expect
@@ -56,11 +56,11 @@
}
constants {
#C1 = false
- #C2 = tearoff self::AKeep::create
+ #C2 = static-tearoff self::AKeep::create
#C3 = "dart2js:noInline"
#C4 = null
#C5 = core::pragma {name:#C3, options:#C4}
- #C6 = tearoff self::NameManglingKeep::create
+ #C6 = static-tearoff self::NameManglingKeep::create
#C7 = 10
#C8 = pro::TagNumber {tagNumber:#C7}
}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/set_map_constructor_concrete.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/set_map_constructor_concrete.dart.expect
index 464d851..cffe9fc 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/set_map_constructor_concrete.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/set_map_constructor_concrete.dart.expect
@@ -33,6 +33,6 @@
core::print(self::linkedCustomMap);
}
constants {
- #C1 = tearoff core::identical
- #C2 = tearoff core::identityHashCode
+ #C1 = static-tearoff core::identical
+ #C2 = static-tearoff core::identityHashCode
}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method_tearoff.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method_tearoff.dart.expect
index 8296cf3..8167df0 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method_tearoff.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/unboxed_static_method_tearoff.dart.expect
@@ -93,16 +93,16 @@
}
constants {
#C1 = null
- #C2 = tearoff self::takePositional
- #C3 = tearoff self::takeOptional
- #C4 = tearoff self::takeNamed
- #C5 = tearoff self::returnUnboxedSmi
- #C6 = tearoff self::returnUnboxedInt
- #C7 = tearoff self::returnUnboxedDouble
- #C8 = tearoff self::returnBoxedNullableInt
- #C9 = tearoff self::returnBoxedNullableDouble
- #C10 = tearoff self::returnBoxedIntOrDouble
- #C11 = tearoff self::returnBoxedNullableIntOrDouble
- #C12 = tearoff self::returnBoxedNullableX
- #C13 = tearoff self::returnBoxedX
+ #C2 = static-tearoff self::takePositional
+ #C3 = static-tearoff self::takeOptional
+ #C4 = static-tearoff self::takeNamed
+ #C5 = static-tearoff self::returnUnboxedSmi
+ #C6 = static-tearoff self::returnUnboxedInt
+ #C7 = static-tearoff self::returnUnboxedDouble
+ #C8 = static-tearoff self::returnBoxedNullableInt
+ #C9 = static-tearoff self::returnBoxedNullableDouble
+ #C10 = static-tearoff self::returnBoxedIntOrDouble
+ #C11 = static-tearoff self::returnBoxedNullableIntOrDouble
+ #C12 = static-tearoff self::returnBoxedNullableX
+ #C13 = static-tearoff self::returnBoxedX
}
diff --git a/tests/ffi/ffi_native_test.dart b/tests/ffi/ffi_native_test.dart
index df21804..b700981 100644
--- a/tests/ffi/ffi_native_test.dart
+++ b/tests/ffi/ffi_native_test.dart
@@ -39,6 +39,15 @@
@FfiNative<Void Function(Handle)>("bar", isLeaf: true) //# 02: compile-time error
external void bar(Object); //# 02: compile-time error
+class Classy {
+ @FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr')
+ external static int returnIntPtrStatic(int x);
+
+ // Error: FfiNative annotations can only be used on static functions.
+ @FfiNative<IntPtr Function(IntPtr)>('ReturnIntPtr') //# 03: compile-time error
+ external int returnIntPtrMethod(int x); //# 03: compile-time error
+}
+
void main() {
// Register test resolver for top-level functions above.
final root_lib_url = getRootLibraryUrl();
@@ -47,6 +56,7 @@
// Test we can call FfiNative functions.
Expect.equals(123, returnIntPtr(123));
Expect.equals(123, returnIntPtrLeaf(123));
+ Expect.equals(123, Classy.returnIntPtrStatic(123));
// Test FfiNative leaf calls remain in generated code.
// Regular calls should transition generated -> native.
diff --git a/tools/VERSION b/tools/VERSION
index 4b7a145..46fd44a 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 337
+PRERELEASE 338
PRERELEASE_PATCH 0
\ No newline at end of file