Version 2.14.0-364.0.dev
Merge commit '4fc912c408f243d228680475a55f5f615c429a01' into 'dev'
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 b8bc5ac..e29a156 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -722,10 +722,22 @@
TreeNode visitInstantiation(Instantiation node, TreeNode? removalSentinel) {
Instantiation result =
super.visitInstantiation(node, removalSentinel) as Instantiation;
- if (enableConstructorTearOff &&
- result.expression is ConstantExpression &&
- result.typeArguments.every(isInstantiated)) {
- return evaluateAndTransformWithContext(node, result);
+ Expression expression = result.expression;
+ if (enableConstructorTearOff && expression is ConstantExpression) {
+ if (result.typeArguments.every(isInstantiated)) {
+ return evaluateAndTransformWithContext(node, result);
+ } else {
+ Constant constant = expression.constant;
+ if (constant is TypedefTearOffConstant) {
+ Substitution substitution =
+ Substitution.fromPairs(constant.parameters, node.typeArguments);
+ return new Instantiation(
+ new ConstantExpression(constant.tearOffConstant,
+ constant.tearOffConstant.getType(_staticTypeContext!))
+ ..fileOffset = expression.fileOffset,
+ constant.types.map(substitution.substituteType).toList());
+ }
+ }
}
return node;
}
@@ -3257,7 +3269,7 @@
@override
Constant visitInstantiation(Instantiation node) {
- final Constant constant = _evaluateSubexpression(node.expression);
+ Constant constant = _evaluateSubexpression(node.expression);
if (constant is AbortConstant) return constant;
if (shouldBeUnevaluated) {
return unevaluated(
@@ -3288,7 +3300,14 @@
// ignore: unnecessary_null_comparison
assert(types != null);
- final List<DartType> typeArguments = convertTypes(types);
+ List<DartType> typeArguments = convertTypes(types);
+ if (constant is TypedefTearOffConstant) {
+ Substitution substitution =
+ Substitution.fromPairs(constant.parameters, typeArguments);
+ typeArguments =
+ constant.types.map(substitution.substituteType).toList();
+ constant = constant.tearOffConstant;
+ }
return canonicalize(new InstantiationConstant(constant, typeArguments));
} else {
// Probably unreachable.
diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt
index 269a892..217f03c 100644
--- a/pkg/front_end/test/spell_checking_list_tests.txt
+++ b/pkg/front_end/test/spell_checking_list_tests.txt
@@ -438,8 +438,12 @@
fuzz
fuzzing
fx
+g1a
+g1b
+g1c
g2a
g2b
+g2c
g3a
g3b
gallery
@@ -459,8 +463,12 @@
gtgt
gulp
gunk
+h1a
+h1b
+h1c
h2a
h2b
+h2c
h3a
h3b
h4a
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart
new file mode 100644
index 0000000..4291871
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart
@@ -0,0 +1,64 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A<T> {}
+
+typedef F<X extends num> = A<X>;
+typedef G<Y> = A<int>;
+typedef H<X, Y> = A<X>;
+
+const f1a = A<int>.new;
+const f1b = F<int>.new;
+const A<int> Function() f1c = F.new;
+
+const g1a = A<int>.new;
+const g1b = G<String>.new;
+const A<int> Function() g1c = G.new;
+
+const h1a = A<int>.new;
+const h1b = H<int, String>.new;
+const A<int> Function() h1c = H.new;
+
+main() {
+ test<int>();
+
+ identical(f1a, f1b);
+ identical(f1a, f1c);
+
+ identical(g1a, g1b);
+ identical(g1a, g1c);
+
+ identical(h1a, h1b);
+ identical(h1a, h1c);
+}
+
+test<T extends num>() {
+ var f2a = A<T>.new;
+ var f2b = F<T>.new;
+ A<T> Function() f2c = F.new;
+
+ var g2a = A<int>.new;
+ var g2b = G<T>.new;
+ A<int> Function() g2c = G.new;
+
+ var h2a = A<T>.new;
+ var h2b = H<T, String>.new;
+ A<T> Function() h2c = H.new;
+
+ expect(f1a, f2a);
+ expect(f2a, f2b);
+ expect(f2a, f2c);
+
+ expect(g1a, g2a);
+ expect(g2a, g2b);
+ expect(g2a, g2c);
+
+ expect(h1a, h2a);
+ expect(h2a, h2b);
+ expect(h2a, h2c);
+}
+
+expect(expected, actual) {
+ if (expected != actual) throw 'Expected $expected, actual $actual';
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.expect
new file mode 100644
index 0000000..8309676
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.expect
@@ -0,0 +1,59 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+}
+static const field () → self::A<core::int> f1a = #C2;
+static const field () → self::A<core::int> f1b = #C2;
+static const field () → self::A<core::int> f1c = #C2;
+static const field () → self::A<core::int> g1a = #C2;
+static const field () → self::A<core::int> g1b = #C2;
+static const field () → self::A<core::int> g1c = #C2;
+static const field () → self::A<core::int> h1a = #C2;
+static const field () → self::A<core::int> h1b = #C2;
+static const field () → self::A<core::int> h1c = #C2;
+static method main() → dynamic {
+ self::test<core::int>();
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+}
+static method test<T extends core::num>() → dynamic {
+ () → self::A<self::test::T> f2a = #C1<self::test::T>;
+ () → self::A<self::test::T> f2b = #C1<self::test::T>;
+ () → self::A<self::test::T> f2c = #C1<self::test::T>;
+ () → self::A<core::int> g2a = #C2;
+ () → self::A<core::int> g2b = #C2;
+ () → self::A<core::int> g2c = #C2;
+ () → self::A<self::test::T> h2a = #C1<self::test::T>;
+ () → self::A<self::test::T> h2b = #C1<self::test::T>;
+ () → self::A<self::test::T> h2c = #C1<self::test::T>;
+ self::expect(#C2, f2a);
+ self::expect(f2a, f2b);
+ self::expect(f2a, f2c);
+ self::expect(#C2, g2a);
+ self::expect(g2a, g2b);
+ self::expect(g2a, g2c);
+ self::expect(#C2, h2a);
+ self::expect(h2a, h2b);
+ self::expect(h2a, h2c);
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+
+constants {
+ #C1 = constructor-tearoff self::A::•
+ #C2 = instantiation self::A::• <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.transformed.expect
new file mode 100644
index 0000000..52278d0
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.strong.transformed.expect
@@ -0,0 +1,68 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+}
+static const field () → self::A<core::int> f1a = #C2;
+static const field () → self::A<core::int> f1b = #C2;
+static const field () → self::A<core::int> f1c = #C2;
+static const field () → self::A<core::int> g1a = #C2;
+static const field () → self::A<core::int> g1b = #C2;
+static const field () → self::A<core::int> g1c = #C2;
+static const field () → self::A<core::int> h1a = #C2;
+static const field () → self::A<core::int> h1b = #C2;
+static const field () → self::A<core::int> h1c = #C2;
+static method main() → dynamic {
+ self::test<core::int>();
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+}
+static method test<T extends core::num>() → dynamic {
+ () → self::A<self::test::T> f2a = #C1<self::test::T>;
+ () → self::A<self::test::T> f2b = #C1<self::test::T>;
+ () → self::A<self::test::T> f2c = #C1<self::test::T>;
+ () → self::A<core::int> g2a = #C2;
+ () → self::A<core::int> g2b = #C2;
+ () → self::A<core::int> g2c = #C2;
+ () → self::A<self::test::T> h2a = #C1<self::test::T>;
+ () → self::A<self::test::T> h2b = #C1<self::test::T>;
+ () → self::A<self::test::T> h2c = #C1<self::test::T>;
+ self::expect(#C2, f2a);
+ self::expect(f2a, f2b);
+ self::expect(f2a, f2c);
+ self::expect(#C2, g2a);
+ self::expect(g2a, g2b);
+ self::expect(g2a, g2c);
+ self::expect(#C2, h2a);
+ self::expect(h2a, h2b);
+ self::expect(h2a, h2c);
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+
+constants {
+ #C1 = constructor-tearoff self::A::•
+ #C2 = instantiation self::A::• <core::int>
+}
+
+Extra constant evaluation status:
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:26:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:27:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:29:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:30:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:32:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:33:3 -> BoolConstant(true)
+Extra constant evaluation: evaluated: 45, effectively constant: 6
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline.expect
new file mode 100644
index 0000000..36311c1
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline.expect
@@ -0,0 +1,16 @@
+class A<T> {}
+typedef F<X extends num> = A<X>;
+typedef G<Y> = A<int>;
+typedef H<X, Y> = A<X>;
+const f1a = A<int>.new;
+const f1b = F<int>.new;
+const A<int> Function() f1c = F.new;
+const g1a = A<int>.new;
+const g1b = G<String>.new;
+const A<int> Function() g1c = G.new;
+const h1a = A<int>.new;
+const h1b = H<int, String>.new;
+const A<int> Function() h1c = H.new;
+main() {}
+test<T extends num>() {}
+expect(expected, actual) {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.expect
new file mode 100644
index 0000000..2dc0e88
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.expect
@@ -0,0 +1,60 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+}
+static const field () → self::A<core::int> f1a = #C2;
+static const field () → self::A<core::int> f1b = #C2;
+static const field () → self::A<core::int> f1c = #C2;
+static const field () → self::A<core::int> g1a = #C2;
+static const field () → self::A<core::int> g1b = #C2;
+static const field () → self::A<core::int> g1c = #C3;
+static const field () → self::A<core::int> h1a = #C2;
+static const field () → self::A<core::int> h1b = #C2;
+static const field () → self::A<core::int> h1c = #C2;
+static method main() → dynamic {
+ self::test<core::int>();
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C3);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+}
+static method test<T extends core::num>() → dynamic {
+ () → self::A<self::test::T> f2a = #C1<self::test::T>;
+ () → self::A<self::test::T> f2b = #C1<self::test::T>;
+ () → self::A<self::test::T> f2c = #C1<self::test::T>;
+ () → self::A<core::int> g2a = #C2;
+ () → self::A<core::int> g2b = #C2;
+ () → self::A<core::int> g2c = #C3;
+ () → self::A<self::test::T> h2a = #C1<self::test::T>;
+ () → self::A<self::test::T> h2b = #C1<self::test::T>;
+ () → self::A<self::test::T> h2c = #C1<self::test::T>;
+ self::expect(#C2, f2a);
+ self::expect(f2a, f2b);
+ self::expect(f2a, f2c);
+ self::expect(#C2, g2a);
+ self::expect(g2a, g2b);
+ self::expect(g2a, g2c);
+ self::expect(#C2, h2a);
+ self::expect(h2a, h2b);
+ self::expect(h2a, h2c);
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+
+constants {
+ #C1 = constructor-tearoff self::A::•
+ #C2 = instantiation self::A::• <core::int*>
+ #C3 = instantiation self::A::• <core::int>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.outline.expect
new file mode 100644
index 0000000..0ce38f00
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.outline.expect
@@ -0,0 +1,39 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ ;
+}
+static const field () → self::A<core::int> f1a = self::A::•<core::int>;
+static const field () → self::A<core::int> f1b = self::A::•<core::int>;
+static const field () → self::A<core::int> f1c = <X extends core::num>.(self::A::•<X>)<core::int>;
+static const field () → self::A<core::int> g1a = self::A::•<core::int>;
+static const field () → self::A<core::int> g1b = self::A::•<core::int>;
+static const field () → self::A<core::int> g1c = <unrelated Y extends core::Object? = dynamic>.(self::A::•<core::int>)<dynamic>;
+static const field () → self::A<core::int> h1a = self::A::•<core::int>;
+static const field () → self::A<core::int> h1b = self::A::•<core::int>;
+static const field () → self::A<core::int> h1c = <X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>.(self::A::•<X%>)<core::int, dynamic>;
+static method main() → dynamic
+ ;
+static method test<T extends core::num>() → dynamic
+ ;
+static method expect(dynamic expected, dynamic actual) → dynamic
+ ;
+
+
+Extra constant evaluation status:
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:11:13 -> InstantiationConstant(A.<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:12:13 -> InstantiationConstant(A.<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:13:31 -> InstantiationConstant(A.<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:15:13 -> InstantiationConstant(A.<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:16:13 -> InstantiationConstant(A.<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:17:31 -> InstantiationConstant(A.<int>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:19:13 -> InstantiationConstant(A.<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:20:13 -> InstantiationConstant(A.<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:21:31 -> InstantiationConstant(A.<int*>)
+Extra constant evaluation: evaluated: 9, effectively constant: 9
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.transformed.expect
new file mode 100644
index 0000000..9c78714
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.weak.transformed.expect
@@ -0,0 +1,69 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+}
+static const field () → self::A<core::int> f1a = #C2;
+static const field () → self::A<core::int> f1b = #C2;
+static const field () → self::A<core::int> f1c = #C2;
+static const field () → self::A<core::int> g1a = #C2;
+static const field () → self::A<core::int> g1b = #C2;
+static const field () → self::A<core::int> g1c = #C3;
+static const field () → self::A<core::int> h1a = #C2;
+static const field () → self::A<core::int> h1b = #C2;
+static const field () → self::A<core::int> h1c = #C2;
+static method main() → dynamic {
+ self::test<core::int>();
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C3);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C2);
+}
+static method test<T extends core::num>() → dynamic {
+ () → self::A<self::test::T> f2a = #C1<self::test::T>;
+ () → self::A<self::test::T> f2b = #C1<self::test::T>;
+ () → self::A<self::test::T> f2c = #C1<self::test::T>;
+ () → self::A<core::int> g2a = #C2;
+ () → self::A<core::int> g2b = #C2;
+ () → self::A<core::int> g2c = #C3;
+ () → self::A<self::test::T> h2a = #C1<self::test::T>;
+ () → self::A<self::test::T> h2b = #C1<self::test::T>;
+ () → self::A<self::test::T> h2c = #C1<self::test::T>;
+ self::expect(#C2, f2a);
+ self::expect(f2a, f2b);
+ self::expect(f2a, f2c);
+ self::expect(#C2, g2a);
+ self::expect(g2a, g2b);
+ self::expect(g2a, g2c);
+ self::expect(#C2, h2a);
+ self::expect(h2a, h2b);
+ self::expect(h2a, h2c);
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+
+constants {
+ #C1 = constructor-tearoff self::A::•
+ #C2 = instantiation self::A::• <core::int*>
+ #C3 = instantiation self::A::• <core::int>
+}
+
+Extra constant evaluation status:
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:26:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:27:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:29:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:30:3 -> BoolConstant(false)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:32:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:33:3 -> BoolConstant(true)
+Extra constant evaluation: evaluated: 45, effectively constant: 6
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart
new file mode 100644
index 0000000..4291871
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart
@@ -0,0 +1,64 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A<T> {}
+
+typedef F<X extends num> = A<X>;
+typedef G<Y> = A<int>;
+typedef H<X, Y> = A<X>;
+
+const f1a = A<int>.new;
+const f1b = F<int>.new;
+const A<int> Function() f1c = F.new;
+
+const g1a = A<int>.new;
+const g1b = G<String>.new;
+const A<int> Function() g1c = G.new;
+
+const h1a = A<int>.new;
+const h1b = H<int, String>.new;
+const A<int> Function() h1c = H.new;
+
+main() {
+ test<int>();
+
+ identical(f1a, f1b);
+ identical(f1a, f1c);
+
+ identical(g1a, g1b);
+ identical(g1a, g1c);
+
+ identical(h1a, h1b);
+ identical(h1a, h1c);
+}
+
+test<T extends num>() {
+ var f2a = A<T>.new;
+ var f2b = F<T>.new;
+ A<T> Function() f2c = F.new;
+
+ var g2a = A<int>.new;
+ var g2b = G<T>.new;
+ A<int> Function() g2c = G.new;
+
+ var h2a = A<T>.new;
+ var h2b = H<T, String>.new;
+ A<T> Function() h2c = H.new;
+
+ expect(f1a, f2a);
+ expect(f2a, f2b);
+ expect(f2a, f2c);
+
+ expect(g1a, g2a);
+ expect(g2a, g2b);
+ expect(g2a, g2c);
+
+ expect(h1a, h2a);
+ expect(h2a, h2b);
+ expect(h2a, h2c);
+}
+
+expect(expected, actual) {
+ if (expected != actual) throw 'Expected $expected, actual $actual';
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.strong.expect
new file mode 100644
index 0000000..56ac791
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.strong.expect
@@ -0,0 +1,73 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::T%>
+ return new self::A::•<self::A::_#new#tearOff::T%>();
+}
+static const field () → self::A<core::int> f1a = #C2;
+static const field () → self::A<core::int> f1b = #C2;
+static const field () → self::A<core::int> f1c = #C4;
+static const field () → self::A<core::int> g1a = #C2;
+static const field () → self::A<core::int> g1b = #C2;
+static const field () → self::A<core::int> g1c = #C6;
+static const field () → self::A<core::int> h1a = #C2;
+static const field () → self::A<core::int> h1b = #C2;
+static const field () → self::A<core::int> h1c = #C8;
+static method main() → dynamic {
+ self::test<core::int>();
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C4);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C6);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C8);
+}
+static method test<T extends core::num>() → dynamic {
+ () → self::A<self::test::T> f2a = #C1<self::test::T>;
+ () → self::A<self::test::T> f2b = #C1<self::test::T>;
+ () → self::A<self::test::T> f2c = #C3<self::test::T>;
+ () → self::A<core::int> g2a = #C2;
+ () → self::A<core::int> g2b = #C2;
+ () → self::A<core::int> g2c = #C6;
+ () → self::A<self::test::T> h2a = #C1<self::test::T>;
+ () → self::A<self::test::T> h2b = #C1<self::test::T>;
+ () → self::A<self::test::T> h2c = #C7<self::test::T, dynamic>;
+ self::expect(#C2, f2a);
+ self::expect(f2a, f2b);
+ self::expect(f2a, f2c);
+ self::expect(#C2, g2a);
+ self::expect(g2a, g2b);
+ self::expect(g2a, g2c);
+ self::expect(#C2, h2a);
+ self::expect(h2a, h2b);
+ self::expect(h2a, h2c);
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
+ return new self::A::•<self::_#F#new#tearOff::X>();
+static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
+ return new self::A::•<core::int>();
+static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
+ return new self::A::•<self::_#H#new#tearOff::X%>();
+
+constants {
+ #C1 = static-tearoff self::A::_#new#tearOff
+ #C2 = instantiation self::A::_#new#tearOff <core::int>
+ #C3 = static-tearoff self::_#F#new#tearOff
+ #C4 = instantiation self::_#F#new#tearOff <core::int>
+ #C5 = static-tearoff self::_#G#new#tearOff
+ #C6 = instantiation self::_#G#new#tearOff <dynamic>
+ #C7 = static-tearoff self::_#H#new#tearOff
+ #C8 = instantiation self::_#H#new#tearOff <core::int, dynamic>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.strong.transformed.expect
new file mode 100644
index 0000000..320d6db
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.strong.transformed.expect
@@ -0,0 +1,82 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::T%>
+ return new self::A::•<self::A::_#new#tearOff::T%>();
+}
+static const field () → self::A<core::int> f1a = #C2;
+static const field () → self::A<core::int> f1b = #C2;
+static const field () → self::A<core::int> f1c = #C4;
+static const field () → self::A<core::int> g1a = #C2;
+static const field () → self::A<core::int> g1b = #C2;
+static const field () → self::A<core::int> g1c = #C6;
+static const field () → self::A<core::int> h1a = #C2;
+static const field () → self::A<core::int> h1b = #C2;
+static const field () → self::A<core::int> h1c = #C8;
+static method main() → dynamic {
+ self::test<core::int>();
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C4);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C6);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C8);
+}
+static method test<T extends core::num>() → dynamic {
+ () → self::A<self::test::T> f2a = #C1<self::test::T>;
+ () → self::A<self::test::T> f2b = #C1<self::test::T>;
+ () → self::A<self::test::T> f2c = #C3<self::test::T>;
+ () → self::A<core::int> g2a = #C2;
+ () → self::A<core::int> g2b = #C2;
+ () → self::A<core::int> g2c = #C6;
+ () → self::A<self::test::T> h2a = #C1<self::test::T>;
+ () → self::A<self::test::T> h2b = #C1<self::test::T>;
+ () → self::A<self::test::T> h2c = #C7<self::test::T, dynamic>;
+ self::expect(#C2, f2a);
+ self::expect(f2a, f2b);
+ self::expect(f2a, f2c);
+ self::expect(#C2, g2a);
+ self::expect(g2a, g2b);
+ self::expect(g2a, g2c);
+ self::expect(#C2, h2a);
+ self::expect(h2a, h2b);
+ self::expect(h2a, h2c);
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
+ return new self::A::•<self::_#F#new#tearOff::X>();
+static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
+ return new self::A::•<core::int>();
+static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
+ return new self::A::•<self::_#H#new#tearOff::X%>();
+
+constants {
+ #C1 = static-tearoff self::A::_#new#tearOff
+ #C2 = instantiation self::A::_#new#tearOff <core::int>
+ #C3 = static-tearoff self::_#F#new#tearOff
+ #C4 = instantiation self::_#F#new#tearOff <core::int>
+ #C5 = static-tearoff self::_#G#new#tearOff
+ #C6 = instantiation self::_#G#new#tearOff <dynamic>
+ #C7 = static-tearoff self::_#H#new#tearOff
+ #C8 = instantiation self::_#H#new#tearOff <core::int, dynamic>
+}
+
+Extra constant evaluation status:
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:26:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:27:3 -> BoolConstant(false)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:29:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:30:3 -> BoolConstant(false)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:32:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:33:3 -> BoolConstant(false)
+Extra constant evaluation: evaluated: 49, effectively constant: 6
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline.expect
new file mode 100644
index 0000000..36311c1
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline.expect
@@ -0,0 +1,16 @@
+class A<T> {}
+typedef F<X extends num> = A<X>;
+typedef G<Y> = A<int>;
+typedef H<X, Y> = A<X>;
+const f1a = A<int>.new;
+const f1b = F<int>.new;
+const A<int> Function() f1c = F.new;
+const g1a = A<int>.new;
+const g1b = G<String>.new;
+const A<int> Function() g1c = G.new;
+const h1a = A<int>.new;
+const h1b = H<int, String>.new;
+const A<int> Function() h1c = H.new;
+main() {}
+test<T extends num>() {}
+expect(expected, actual) {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.weak.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.weak.expect
new file mode 100644
index 0000000..c37338f
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.weak.expect
@@ -0,0 +1,73 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::T%>
+ return new self::A::•<self::A::_#new#tearOff::T%>();
+}
+static const field () → self::A<core::int> f1a = #C2;
+static const field () → self::A<core::int> f1b = #C2;
+static const field () → self::A<core::int> f1c = #C4;
+static const field () → self::A<core::int> g1a = #C2;
+static const field () → self::A<core::int> g1b = #C2;
+static const field () → self::A<core::int> g1c = #C6;
+static const field () → self::A<core::int> h1a = #C2;
+static const field () → self::A<core::int> h1b = #C2;
+static const field () → self::A<core::int> h1c = #C8;
+static method main() → dynamic {
+ self::test<core::int>();
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C4);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C6);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C8);
+}
+static method test<T extends core::num>() → dynamic {
+ () → self::A<self::test::T> f2a = #C1<self::test::T>;
+ () → self::A<self::test::T> f2b = #C1<self::test::T>;
+ () → self::A<self::test::T> f2c = #C3<self::test::T>;
+ () → self::A<core::int> g2a = #C2;
+ () → self::A<core::int> g2b = #C2;
+ () → self::A<core::int> g2c = #C6;
+ () → self::A<self::test::T> h2a = #C1<self::test::T>;
+ () → self::A<self::test::T> h2b = #C1<self::test::T>;
+ () → self::A<self::test::T> h2c = #C7<self::test::T, dynamic>;
+ self::expect(#C2, f2a);
+ self::expect(f2a, f2b);
+ self::expect(f2a, f2c);
+ self::expect(#C2, g2a);
+ self::expect(g2a, g2b);
+ self::expect(g2a, g2c);
+ self::expect(#C2, h2a);
+ self::expect(h2a, h2b);
+ self::expect(h2a, h2c);
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
+ return new self::A::•<self::_#F#new#tearOff::X>();
+static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
+ return new self::A::•<core::int>();
+static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
+ return new self::A::•<self::_#H#new#tearOff::X%>();
+
+constants {
+ #C1 = static-tearoff self::A::_#new#tearOff
+ #C2 = instantiation self::A::_#new#tearOff <core::int*>
+ #C3 = static-tearoff self::_#F#new#tearOff
+ #C4 = instantiation self::_#F#new#tearOff <core::int*>
+ #C5 = static-tearoff self::_#G#new#tearOff
+ #C6 = instantiation self::_#G#new#tearOff <dynamic>
+ #C7 = static-tearoff self::_#H#new#tearOff
+ #C8 = instantiation self::_#H#new#tearOff <core::int*, dynamic>
+}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.weak.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.weak.outline.expect
new file mode 100644
index 0000000..f0dde1a
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.weak.outline.expect
@@ -0,0 +1,47 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::T%>
+ return new self::A::•<self::A::_#new#tearOff::T%>();
+}
+static const field () → self::A<core::int> f1a = self::A::_#new#tearOff<core::int>;
+static const field () → self::A<core::int> f1b = self::A::_#new#tearOff<core::int>;
+static const field () → self::A<core::int> f1c = self::_#F#new#tearOff<core::int>;
+static const field () → self::A<core::int> g1a = self::A::_#new#tearOff<core::int>;
+static const field () → self::A<core::int> g1b = self::A::_#new#tearOff<core::int>;
+static const field () → self::A<core::int> g1c = self::_#G#new#tearOff<dynamic>;
+static const field () → self::A<core::int> h1a = self::A::_#new#tearOff<core::int>;
+static const field () → self::A<core::int> h1b = self::A::_#new#tearOff<core::int>;
+static const field () → self::A<core::int> h1c = self::_#H#new#tearOff<core::int, dynamic>;
+static method main() → dynamic
+ ;
+static method test<T extends core::num>() → dynamic
+ ;
+static method expect(dynamic expected, dynamic actual) → dynamic
+ ;
+static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
+ return new self::A::•<self::_#F#new#tearOff::X>();
+static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
+ return new self::A::•<core::int>();
+static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
+ return new self::A::•<self::_#H#new#tearOff::X%>();
+
+
+Extra constant evaluation status:
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:11:13 -> InstantiationConstant(A._#new#tearOff<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:12:13 -> InstantiationConstant(A._#new#tearOff<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:13:31 -> InstantiationConstant(_#F#new#tearOff<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:15:13 -> InstantiationConstant(A._#new#tearOff<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:16:13 -> InstantiationConstant(A._#new#tearOff<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:17:31 -> InstantiationConstant(_#G#new#tearOff<dynamic>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:19:13 -> InstantiationConstant(A._#new#tearOff<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:20:13 -> InstantiationConstant(A._#new#tearOff<int*>)
+Evaluated: Instantiation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:21:31 -> InstantiationConstant(_#H#new#tearOff<int*, dynamic>)
+Extra constant evaluation: evaluated: 13, effectively constant: 9
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.weak.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.weak.transformed.expect
new file mode 100644
index 0000000..ee7cfa6
--- /dev/null
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.weak.transformed.expect
@@ -0,0 +1,82 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+typedef F<X extends core::num> = self::A<X>;
+typedef G<unrelated Y extends core::Object? = dynamic> = self::A<core::int>;
+typedef H<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic> = self::A<X%>;
+class A<T extends core::Object? = dynamic> extends core::Object {
+ synthetic constructor •() → self::A<self::A::T%>
+ : super core::Object::•()
+ ;
+ static method _#new#tearOff<T extends core::Object? = dynamic>() → self::A<self::A::_#new#tearOff::T%>
+ return new self::A::•<self::A::_#new#tearOff::T%>();
+}
+static const field () → self::A<core::int> f1a = #C2;
+static const field () → self::A<core::int> f1b = #C2;
+static const field () → self::A<core::int> f1c = #C4;
+static const field () → self::A<core::int> g1a = #C2;
+static const field () → self::A<core::int> g1b = #C2;
+static const field () → self::A<core::int> g1c = #C6;
+static const field () → self::A<core::int> h1a = #C2;
+static const field () → self::A<core::int> h1b = #C2;
+static const field () → self::A<core::int> h1c = #C8;
+static method main() → dynamic {
+ self::test<core::int>();
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C4);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C6);
+ core::identical(#C2, #C2);
+ core::identical(#C2, #C8);
+}
+static method test<T extends core::num>() → dynamic {
+ () → self::A<self::test::T> f2a = #C1<self::test::T>;
+ () → self::A<self::test::T> f2b = #C1<self::test::T>;
+ () → self::A<self::test::T> f2c = #C3<self::test::T>;
+ () → self::A<core::int> g2a = #C2;
+ () → self::A<core::int> g2b = #C2;
+ () → self::A<core::int> g2c = #C6;
+ () → self::A<self::test::T> h2a = #C1<self::test::T>;
+ () → self::A<self::test::T> h2b = #C1<self::test::T>;
+ () → self::A<self::test::T> h2c = #C7<self::test::T, dynamic>;
+ self::expect(#C2, f2a);
+ self::expect(f2a, f2b);
+ self::expect(f2a, f2c);
+ self::expect(#C2, g2a);
+ self::expect(g2a, g2b);
+ self::expect(g2a, g2c);
+ self::expect(#C2, h2a);
+ self::expect(h2a, h2b);
+ self::expect(h2a, h2c);
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+ if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual))
+ throw "Expected ${expected}, actual ${actual}";
+}
+static method _#F#new#tearOff<X extends core::num>() → self::A<self::_#F#new#tearOff::X>
+ return new self::A::•<self::_#F#new#tearOff::X>();
+static method _#G#new#tearOff<unrelated Y extends core::Object? = dynamic>() → self::A<core::int>
+ return new self::A::•<core::int>();
+static method _#H#new#tearOff<X extends core::Object? = dynamic, unrelated Y extends core::Object? = dynamic>() → self::A<self::_#H#new#tearOff::X%>
+ return new self::A::•<self::_#H#new#tearOff::X%>();
+
+constants {
+ #C1 = static-tearoff self::A::_#new#tearOff
+ #C2 = instantiation self::A::_#new#tearOff <core::int*>
+ #C3 = static-tearoff self::_#F#new#tearOff
+ #C4 = instantiation self::_#F#new#tearOff <core::int*>
+ #C5 = static-tearoff self::_#G#new#tearOff
+ #C6 = instantiation self::_#G#new#tearOff <dynamic>
+ #C7 = static-tearoff self::_#H#new#tearOff
+ #C8 = instantiation self::_#H#new#tearOff <core::int*, dynamic>
+}
+
+Extra constant evaluation status:
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:26:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:27:3 -> BoolConstant(false)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:29:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:30:3 -> BoolConstant(false)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:32:3 -> BoolConstant(true)
+Evaluated: StaticInvocation @ org-dartlang-testcase:///inferred_non_proper_rename.dart:33:3 -> BoolConstant(false)
+Extra constant evaluation: evaluated: 49, effectively constant: 6
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 218d370..b69871d 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
@@ -63,36 +63,36 @@
static method test2() → () → self::A
return #C1;
static method test3() → () → self::A
- return #C3;
+ return #C2;
static method test4() → () → self::A
- return #C3;
+ return #C2;
static method test5() → () → self::A
return #C1;
static method test6() → () → self::A
return #C1;
static method test7() → () → self::B<core::String>
- return #C5;
+ return #C4;
static method test8() → () → self::B<core::String>
- return #C5;
+ return #C4;
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 (#C5) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
static method test10() → () → self::B<core::String>
- return #C7;
+ return #C6;
static method test11() → () → self::B<core::String>
- return #C9;
+ return #C8;
static method test12() → () → self::B<core::num>
- return #C10;
+ return #C9;
static method test13() → () → self::B<core::num>
- return #C11;
+ return #C10;
static method test14() → () → self::B<core::num>
- return #C12;
+ return #C11;
static method test15() → () → self::B<core::num>
- return #C14;
+ return #C9;
static method test16() → <Y extends core::num = dynamic>() → self::B<Y>
- return #C13;
+ return #C12;
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 (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (#C12) 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 #C10;
+ return #C9;
static method test19() → () → self::B<core::num>
- return #C11;
+ return #C10;
static method test20() → () → self::B<core::num>
- return #C12;
+ return #C11;
static method test21() → () → self::B<core::num>
- return #C16;
+ return #C9;
static method test22() → <Y extends core::num = dynamic, Z extends core::String = dynamic>() → self::B<Y>
- return #C15;
+ return #C13;
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,27 +118,24 @@
^" 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 (#C15) 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 (#C13) 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 #C17;
+ return #C14;
static method main() → dynamic {}
constants {
#C1 = constructor-tearoff self::A::•
- #C2 = typedef-tearoff <unrelated X extends core::num>.(#C1)
- #C3 = instantiation #C2 <core::num>
- #C4 = constructor-tearoff self::B::•
- #C5 = instantiation self::B::• <core::String>
- #C6 = constructor-tearoff self::B::foo
- #C7 = instantiation self::B::foo <core::String>
- #C8 = static-tearoff self::B::bar
- #C9 = instantiation self::B::bar <core::String>
- #C10 = instantiation self::B::• <core::num>
- #C11 = instantiation self::B::foo <core::num>
- #C12 = instantiation self::B::bar <core::num>
- #C13 = typedef-tearoff <X extends core::num>.(#C4<X>)
- #C14 = instantiation #C13 <core::num>
- #C15 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C4<X>)
- #C16 = instantiation #C15 <core::num, core::String>
- #C17 = instantiation #C13 <Never>
+ #C2 = instantiation self::A::• <>
+ #C3 = constructor-tearoff self::B::•
+ #C4 = instantiation self::B::• <core::String>
+ #C5 = constructor-tearoff self::B::foo
+ #C6 = instantiation self::B::foo <core::String>
+ #C7 = static-tearoff self::B::bar
+ #C8 = instantiation self::B::bar <core::String>
+ #C9 = instantiation self::B::• <core::num>
+ #C10 = instantiation self::B::foo <core::num>
+ #C11 = instantiation self::B::bar <core::num>
+ #C12 = typedef-tearoff <X extends core::num>.(#C3<X>)
+ #C13 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C3<X>)
+ #C14 = instantiation self::B::• <Never>
}
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 8730f3b..382b745 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
@@ -63,36 +63,36 @@
static method test2() → () → self::A
return #C1;
static method test3() → () → self::A
- return #C3;
+ return #C2;
static method test4() → () → self::A
- return #C3;
+ return #C2;
static method test5() → () → self::A
return #C1;
static method test6() → () → self::A
return #C1;
static method test7() → () → self::B<core::String>
- return #C5;
+ return #C4;
static method test8() → () → self::B<core::String>
- return #C5;
+ return #C4;
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 (#C5) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
static method test10() → () → self::B<core::String>
- return #C7;
+ return #C6;
static method test11() → () → self::B<core::String>
- return #C9;
+ return #C8;
static method test12() → () → self::B<core::num>
- return #C10;
+ return #C9;
static method test13() → () → self::B<core::num>
- return #C11;
+ return #C10;
static method test14() → () → self::B<core::num>
- return #C12;
+ return #C11;
static method test15() → () → self::B<core::num>
- return #C14;
+ return #C9;
static method test16() → <Y extends core::num = dynamic>() → self::B<Y>
- return #C13;
+ return #C12;
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 (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (#C12) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
static method test18() → () → self::B<core::num>
- return #C10;
+ return #C9;
static method test19() → () → self::B<core::num>
- return #C11;
+ return #C10;
static method test20() → () → self::B<core::num>
- return #C12;
+ return #C11;
static method test21() → () → self::B<core::num>
- return #C16;
+ return #C9;
static method test22() → <Y extends core::num = dynamic, Z extends core::String = dynamic>() → self::B<Y>
- return #C15;
+ return #C13;
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,27 +118,24 @@
^" 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 (#C15) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
static method test24() → () → self::B<core::String>
- return #C17;
+ return #C14;
static method main() → dynamic {}
constants {
#C1 = constructor-tearoff self::A::•
- #C2 = typedef-tearoff <unrelated X extends core::num>.(#C1)
- #C3 = instantiation #C2 <core::num>
- #C4 = constructor-tearoff self::B::•
- #C5 = instantiation self::B::• <core::String>
- #C6 = constructor-tearoff self::B::foo
- #C7 = instantiation self::B::foo <core::String>
- #C8 = static-tearoff self::B::bar
- #C9 = instantiation self::B::bar <core::String>
- #C10 = instantiation self::B::• <core::num>
- #C11 = instantiation self::B::foo <core::num>
- #C12 = instantiation self::B::bar <core::num>
- #C13 = typedef-tearoff <X extends core::num>.(#C4<X>)
- #C14 = instantiation #C13 <core::num>
- #C15 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C4<X>)
- #C16 = instantiation #C15 <core::num, core::String>
- #C17 = instantiation #C13 <Never>
+ #C2 = instantiation self::A::• <>
+ #C3 = constructor-tearoff self::B::•
+ #C4 = instantiation self::B::• <core::String>
+ #C5 = constructor-tearoff self::B::foo
+ #C6 = instantiation self::B::foo <core::String>
+ #C7 = static-tearoff self::B::bar
+ #C8 = instantiation self::B::bar <core::String>
+ #C9 = instantiation self::B::• <core::num>
+ #C10 = instantiation self::B::foo <core::num>
+ #C11 = instantiation self::B::bar <core::num>
+ #C12 = typedef-tearoff <X extends core::num>.(#C3<X>)
+ #C13 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C3<X>)
+ #C14 = instantiation self::B::• <Never>
}
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 ba0758d..10912e2 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
@@ -63,36 +63,36 @@
static method test2() → () → self::A
return #C1;
static method test3() → () → self::A
- return #C3;
+ return #C2;
static method test4() → () → self::A
- return #C3;
+ return #C2;
static method test5() → () → self::A
return #C1;
static method test6() → () → self::A
return #C1;
static method test7() → () → self::B<core::String>
- return #C5;
+ return #C4;
static method test8() → () → self::B<core::String>
- return #C5;
+ return #C4;
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 (#C5) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
static method test10() → () → self::B<core::String>
- return #C7;
+ return #C6;
static method test11() → () → self::B<core::String>
- return #C9;
+ return #C8;
static method test12() → () → self::B<core::num>
- return #C10;
+ return #C9;
static method test13() → () → self::B<core::num>
- return #C11;
+ return #C10;
static method test14() → () → self::B<core::num>
- return #C12;
+ return #C11;
static method test15() → () → self::B<core::num>
- return #C14;
+ return #C9;
static method test16() → <Y extends core::num = dynamic>() → self::B<Y>
- return #C13;
+ return #C12;
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 (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (#C12) 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 #C10;
+ return #C9;
static method test19() → () → self::B<core::num>
- return #C11;
+ return #C10;
static method test20() → () → self::B<core::num>
- return #C12;
+ return #C11;
static method test21() → () → self::B<core::num>
- return #C16;
+ return #C9;
static method test22() → <Y extends core::num = dynamic, Z extends core::String = dynamic>() → self::B<Y>
- return #C15;
+ return #C13;
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,27 +118,24 @@
^" 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 (#C15) 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 (#C13) 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 #C17;
+ return #C14;
static method main() → dynamic {}
constants {
#C1 = constructor-tearoff self::A::•
- #C2 = typedef-tearoff <unrelated X extends core::num>.(#C1)
- #C3 = instantiation #C2 <core::num*>
- #C4 = constructor-tearoff self::B::•
- #C5 = instantiation self::B::• <core::String*>
- #C6 = constructor-tearoff self::B::foo
- #C7 = instantiation self::B::foo <core::String*>
- #C8 = static-tearoff self::B::bar
- #C9 = instantiation self::B::bar <core::String*>
- #C10 = instantiation self::B::• <core::num*>
- #C11 = instantiation self::B::foo <core::num*>
- #C12 = instantiation self::B::bar <core::num*>
- #C13 = typedef-tearoff <X extends core::num>.(#C4<X>)
- #C14 = instantiation #C13 <core::num*>
- #C15 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C4<X>)
- #C16 = instantiation #C15 <core::num*, core::String*>
- #C17 = instantiation #C13 <Never*>
+ #C2 = instantiation self::A::• <>
+ #C3 = constructor-tearoff self::B::•
+ #C4 = instantiation self::B::• <core::String*>
+ #C5 = constructor-tearoff self::B::foo
+ #C6 = instantiation self::B::foo <core::String*>
+ #C7 = static-tearoff self::B::bar
+ #C8 = instantiation self::B::bar <core::String*>
+ #C9 = instantiation self::B::• <core::num*>
+ #C10 = instantiation self::B::foo <core::num*>
+ #C11 = instantiation self::B::bar <core::num*>
+ #C12 = typedef-tearoff <X extends core::num>.(#C3<X>)
+ #C13 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C3<X>)
+ #C14 = instantiation self::B::• <Never*>
}
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 b9c3245..86a1666 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
@@ -63,36 +63,36 @@
static method test2() → () → self::A
return #C1;
static method test3() → () → self::A
- return #C3;
+ return #C2;
static method test4() → () → self::A
- return #C3;
+ return #C2;
static method test5() → () → self::A
return #C1;
static method test6() → () → self::A
return #C1;
static method test7() → () → self::B<core::String>
- return #C5;
+ return #C4;
static method test8() → () → self::B<core::String>
- return #C5;
+ return #C4;
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 (#C5) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
+ ^" in (#C4) as{TypeError,ForNonNullableByDefault} () → self::B<core::num>;
static method test10() → () → self::B<core::String>
- return #C7;
+ return #C6;
static method test11() → () → self::B<core::String>
- return #C9;
+ return #C8;
static method test12() → () → self::B<core::num>
- return #C10;
+ return #C9;
static method test13() → () → self::B<core::num>
- return #C11;
+ return #C10;
static method test14() → () → self::B<core::num>
- return #C12;
+ return #C11;
static method test15() → () → self::B<core::num>
- return #C14;
+ return #C9;
static method test16() → <Y extends core::num = dynamic>() → self::B<Y>
- return #C13;
+ return #C12;
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 (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (#C12) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic>() → self::B<Y%>;
static method test18() → () → self::B<core::num>
- return #C10;
+ return #C9;
static method test19() → () → self::B<core::num>
- return #C11;
+ return #C10;
static method test20() → () → self::B<core::num>
- return #C12;
+ return #C11;
static method test21() → () → self::B<core::num>
- return #C16;
+ return #C9;
static method test22() → <Y extends core::num = dynamic, Z extends core::String = dynamic>() → self::B<Y>
- return #C15;
+ return #C13;
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,27 +118,24 @@
^" 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 (#C15) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
+ ^" in (#C13) as{TypeError,ForNonNullableByDefault} <Y extends core::Object? = dynamic, Z extends core::Object? = dynamic>() → self::B<Y%>;
static method test24() → () → self::B<core::String>
- return #C17;
+ return #C14;
static method main() → dynamic {}
constants {
#C1 = constructor-tearoff self::A::•
- #C2 = typedef-tearoff <unrelated X extends core::num>.(#C1)
- #C3 = instantiation #C2 <core::num*>
- #C4 = constructor-tearoff self::B::•
- #C5 = instantiation self::B::• <core::String*>
- #C6 = constructor-tearoff self::B::foo
- #C7 = instantiation self::B::foo <core::String*>
- #C8 = static-tearoff self::B::bar
- #C9 = instantiation self::B::bar <core::String*>
- #C10 = instantiation self::B::• <core::num*>
- #C11 = instantiation self::B::foo <core::num*>
- #C12 = instantiation self::B::bar <core::num*>
- #C13 = typedef-tearoff <X extends core::num>.(#C4<X>)
- #C14 = instantiation #C13 <core::num*>
- #C15 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C4<X>)
- #C16 = instantiation #C15 <core::num*, core::String*>
- #C17 = instantiation #C13 <Never*>
+ #C2 = instantiation self::A::• <>
+ #C3 = constructor-tearoff self::B::•
+ #C4 = instantiation self::B::• <core::String*>
+ #C5 = constructor-tearoff self::B::foo
+ #C6 = instantiation self::B::foo <core::String*>
+ #C7 = static-tearoff self::B::bar
+ #C8 = instantiation self::B::bar <core::String*>
+ #C9 = instantiation self::B::• <core::num*>
+ #C10 = instantiation self::B::foo <core::num*>
+ #C11 = instantiation self::B::bar <core::num*>
+ #C12 = typedef-tearoff <X extends core::num>.(#C3<X>)
+ #C13 = typedef-tearoff <X extends core::num, unrelated Y extends core::String>.(#C3<X>)
+ #C14 = instantiation self::B::• <Never*>
}
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 0b30a52..e12207e 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -10,6 +10,8 @@
constructor_tearoffs/const_tear_off: RuntimeError
constructor_tearoffs/inferred_constructor_tear_off: RuntimeError
+constructor_tearoffs/inferred_non_proper_rename: RuntimeError
+constructor_tearoffs/lowering/inferred_non_proper_rename: RuntimeError
constructor_tearoffs/redirecting_constructors: RuntimeError
constructor_tearoffs/redirecting_factory_tear_off: RuntimeError
extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index 6d07e17..7b53eef 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -8,6 +8,8 @@
constructor_tearoffs/const_tear_off: RuntimeError
constructor_tearoffs/inferred_constructor_tear_off: RuntimeError
+constructor_tearoffs/inferred_non_proper_rename: RuntimeError
+constructor_tearoffs/lowering/inferred_non_proper_rename: RuntimeError
constructor_tearoffs/redirecting_constructors: RuntimeError
constructor_tearoffs/redirecting_factory_tear_off: RuntimeError
extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status
index f4830a4..578e809 100644
--- a/pkg/front_end/testcases/textual_outline.status
+++ b/pkg/front_end/testcases/textual_outline.status
@@ -30,8 +30,10 @@
constructor_tearoffs/generic_tearoff_without_context: FormatterCrash
constructor_tearoffs/identical_instantiated_function_tearoffs: FormatterCrash
constructor_tearoffs/inferred_constructor_tear_off: FormatterCrash
+constructor_tearoffs/inferred_non_proper_rename: FormatterCrash
constructor_tearoffs/instantiation: FormatterCrash
constructor_tearoffs/lowering/inferred_constructor_tear_off: FormatterCrash
+constructor_tearoffs/lowering/inferred_non_proper_rename: FormatterCrash
constructor_tearoffs/lowering/inferred_tear_off: FormatterCrash
constructor_tearoffs/lowering/typedef_from_dill/main: FormatterCrash
constructor_tearoffs/lowering/typedef_identical: FormatterCrash
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index 9f50ba9..0dfa849 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -13,6 +13,8 @@
constructor_tearoffs/const_tear_off: RuntimeError
constructor_tearoffs/inferred_constructor_tear_off: RuntimeError
+constructor_tearoffs/inferred_non_proper_rename: RuntimeError
+constructor_tearoffs/lowering/inferred_non_proper_rename: RuntimeError
constructor_tearoffs/redirecting_constructors: RuntimeError
constructor_tearoffs/redirecting_factory_tear_off: RuntimeError
extension_types/extension_on_nullable: ExpectationFileMismatchSerialized # Expected.
diff --git a/tools/VERSION b/tools/VERSION
index bf290e3..7b703bc 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 363
+PRERELEASE 364
PRERELEASE_PATCH 0
\ No newline at end of file