diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor.dart index 27a7915d5eaeb..7238af4410212 100644 --- a/pkg/_fe_analyzer_shared/lib/src/macros/executor.dart +++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor.dart @@ -89,7 +89,7 @@ abstract class MacroExecutor { /// The [resolveIdentifier] argument should return the import uri to be used /// for that identifier. String buildAugmentationLibrary(Iterable macroResults, - Uri Function(Identifier) resolveIdentifier); + ResolvedIdentifier Function(Identifier) resolveIdentifier); /// Tell the executor to shut down and clean up any resources it may have /// allocated. @@ -220,6 +220,41 @@ class Arguments implements Serializable { } } +/// A resolved [Identifier], this is used when creating augmentation libraries +/// to qualify identifiers where needed. +class ResolvedIdentifier extends Identifier { + /// The import URI for the library that defines the member that is referenced + /// by this identifier. + final Uri uri; + + /// Type type of identifier this is (instance, static, top level). + final IdentifierKind kind; + + /// The unqualified name of this identifier. + @override + final String name; + + /// If this is a static member, then the name of the fully qualified scope + /// surrounding this member. Should not contain a trailing `.`. + /// + /// Typically this would just be the name of a type. + final String? staticScope; + + ResolvedIdentifier({ + required this.kind, + required this.name, + required this.staticScope, + required this.uri, + }); +} + +/// The types of identifiers. +enum IdentifierKind { + instanceMember, + staticInstanceMember, + topLevelMember, +} + /// An opaque identifier for a macro class, retrieved by /// [MacroExecutor.loadMacro]. /// diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor_shared/augmentation_library.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor_shared/augmentation_library.dart index cd0e19889b9c4..56e4fb7a2f76c 100644 --- a/pkg/_fe_analyzer_shared/lib/src/macros/executor_shared/augmentation_library.dart +++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor_shared/augmentation_library.dart @@ -10,26 +10,44 @@ import '../executor.dart'; mixin AugmentationLibraryBuilder on MacroExecutor { @override String buildAugmentationLibrary(Iterable macroResults, - Uri Function(Identifier) resolveIdentifier) { + ResolvedIdentifier Function(Identifier) resolveIdentifier) { StringBuffer importsBuffer = new StringBuffer(); StringBuffer directivesBuffer = new StringBuffer(); Map importPrefixes = {}; int nextPrefix = 0; + // Keeps track of the last part written in `lastDirectivePart`. + String lastDirectivePart = ''; + void writeDirectivePart(String part) { + lastDirectivePart = part; + directivesBuffer.write(part); + } + void buildCode(Code code) { for (Object part in code.parts) { if (part is String) { - directivesBuffer.write(part); + writeDirectivePart(part); } else if (part is Code) { buildCode(part); } else if (part is Identifier) { - Uri uri = resolveIdentifier(part); - String prefix = importPrefixes.putIfAbsent(uri, () { + ResolvedIdentifier resolved = resolveIdentifier(part); + String prefix = importPrefixes.putIfAbsent(resolved.uri, () { String prefix = 'i${nextPrefix++}'; - importsBuffer.writeln("import '$uri' as $prefix;"); + importsBuffer.writeln("import '${resolved.uri}' as $prefix;"); return prefix; }); - directivesBuffer.write('$prefix.${part.name}'); + if (resolved.kind == IdentifierKind.instanceMember) { + // Qualify with `this.` if we don't have a receiver. + if (!lastDirectivePart.trimRight().endsWith('.')) { + writeDirectivePart('this.'); + } + } else { + writeDirectivePart('${prefix}.'); + } + if (resolved.kind == IdentifierKind.staticInstanceMember) { + writeDirectivePart('${resolved.staticScope!}.'); + } + writeDirectivePart('${part.name}'); } else { throw new ArgumentError( 'Code objects only support String, Identifier, and Code ' diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/isolated_executor/isolated_executor.dart b/pkg/_fe_analyzer_shared/lib/src/macros/isolated_executor/isolated_executor.dart index 7713aa31f61e4..69028702c1450 100644 --- a/pkg/_fe_analyzer_shared/lib/src/macros/isolated_executor/isolated_executor.dart +++ b/pkg/_fe_analyzer_shared/lib/src/macros/isolated_executor/isolated_executor.dart @@ -366,7 +366,7 @@ class _SingleIsolatedMacroExecutor extends MacroExecutor { /// These calls are handled by the higher level executor. @override String buildAugmentationLibrary(Iterable macroResults, - Uri Function(Identifier) resolveIdentifier) => + ResolvedIdentifier Function(Identifier) resolveIdentifier) => throw new StateError('Unreachable'); @override diff --git a/pkg/_fe_analyzer_shared/test/macros/executor_shared/augmentation_library_test.dart b/pkg/_fe_analyzer_shared/test/macros/executor_shared/augmentation_library_test.dart index f3a5cbd6e720d..704898ab3f420 100644 --- a/pkg/_fe_analyzer_shared/test/macros/executor_shared/augmentation_library_test.dart +++ b/pkg/_fe_analyzer_shared/test/macros/executor_shared/augmentation_library_test.dart @@ -35,7 +35,7 @@ void main() { ]), ]; var library = _TestExecutor().buildAugmentationLibrary( - results, (Identifier i) => (i as TestIdentifier).libraryImportUri); + results, (Identifier i) => (i as TestIdentifier).resolved); expect(library, equalsIgnoringWhitespace(''' augment class Foo00 { int get i => 0; @@ -68,15 +68,33 @@ void main() { var fooIdentifier = TestIdentifier( id: RemoteInstance.uniqueId, name: 'Foo', - libraryImportUri: Uri.parse('package:foo/foo.dart')); + kind: IdentifierKind.topLevelMember, + staticScope: null, + uri: Uri.parse('package:foo/foo.dart')); var barIdentifier = TestIdentifier( id: RemoteInstance.uniqueId, name: 'Bar', - libraryImportUri: Uri.parse('package:bar/bar.dart')); + kind: IdentifierKind.topLevelMember, + staticScope: null, + uri: Uri.parse('package:bar/bar.dart')); var builderIdentifier = TestIdentifier( id: RemoteInstance.uniqueId, name: 'Builder', - libraryImportUri: Uri.parse('package:builder/builder.dart')); + kind: IdentifierKind.topLevelMember, + staticScope: null, + uri: Uri.parse('package:builder/builder.dart')); + var barInstanceMember = TestIdentifier( + id: RemoteInstance.uniqueId, + name: 'baz', + kind: IdentifierKind.instanceMember, + staticScope: null, + uri: Uri.parse('package:bar/bar.dart')); + var barStaticMember = TestIdentifier( + id: RemoteInstance.uniqueId, + name: 'zap', + kind: IdentifierKind.staticInstanceMember, + staticScope: 'Bar', + uri: Uri.parse('package:bar/bar.dart')); var results = [ MacroExecutionResultImpl(augmentations: [ DeclarationCode.fromParts([ @@ -87,24 +105,32 @@ void main() { '<', barIdentifier, '> {\n', + 'late int ${barInstanceMember.name};\n', barIdentifier, ' build() => new ', barIdentifier, - '();\n}', + '()..', + barInstanceMember, + ' = ', + barStaticMember, + ';', + '\n}', ]), ], newTypeNames: [ 'FooBuilder', ]) ]; var library = _TestExecutor().buildAugmentationLibrary( - results, (Identifier i) => (i as TestIdentifier).libraryImportUri); + results, (Identifier i) => (i as TestIdentifier).resolved); expect(library, equalsIgnoringWhitespace(''' import 'package:foo/foo.dart' as i0; import 'package:builder/builder.dart' as i1; import 'package:bar/bar.dart' as i2; class FooBuilder implements i1.Builder> { - i2.Bar build() => new i2.Bar(); + late int baz; + + i2.Bar build() => new i2.Bar()..baz = i2.Bar.zap; } ''')); }); diff --git a/pkg/_fe_analyzer_shared/test/macros/util.dart b/pkg/_fe_analyzer_shared/test/macros/util.dart index 34625b2e1516e..725b3fd0b9fc4 100644 --- a/pkg/_fe_analyzer_shared/test/macros/util.dart +++ b/pkg/_fe_analyzer_shared/test/macros/util.dart @@ -5,6 +5,7 @@ import 'dart:mirrors'; import 'package:_fe_analyzer_shared/src/macros/api.dart'; +import 'package:_fe_analyzer_shared/src/macros/executor.dart'; import 'package:_fe_analyzer_shared/src/macros/executor_shared/introspection_impls.dart'; import 'package:_fe_analyzer_shared/src/macros/executor_shared/remote_instance.dart'; @@ -108,13 +109,22 @@ class TestNamedStaticType implements NamedStaticType { (library == other.library && identifier.name == other.identifier.name); } -/// An identifier that knows what URI should be used to import it. +/// An identifier that knows the resolved version of itself. class TestIdentifier extends IdentifierImpl { - final Uri libraryImportUri; - - TestIdentifier( - {required int id, required String name, required this.libraryImportUri}) - : super(id: id, name: name); + final ResolvedIdentifier resolved; + + TestIdentifier({ + required int id, + required String name, + required IdentifierKind kind, + required Uri uri, + required String? staticScope, + }) : resolved = ResolvedIdentifier( + kind: kind, name: name, staticScope: staticScope, uri: uri), + super( + id: id, + name: name, + ); } extension DebugCodeString on Code { diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart index e04f3aaddd43f..422afdf3683f6 100644 --- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart +++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart @@ -1622,7 +1622,8 @@ class BodyBuilder extends ScopeListener return fakeReturn.expression!; } - void parseInitializers(Token token, {bool doFinishConstructor = true}) { + List? parseInitializers(Token token, + {bool doFinishConstructor = true}) { Parser parser = new Parser(this, useImplicitCreationExpression: useImplicitCreationExpressionInCfe); if (!token.isEof) { @@ -1635,6 +1636,7 @@ class BodyBuilder extends ScopeListener finishConstructor( member as DeclaredSourceConstructorBuilder, AsyncMarker.Sync, null); } + return _initializers; } Expression parseFieldInitializer(Token token) { diff --git a/pkg/front_end/lib/src/fasta/source/source_constructor_builder.dart b/pkg/front_end/lib/src/fasta/source/source_constructor_builder.dart index 27e2e0e5c8405..2cf43f9c072ae 100644 --- a/pkg/front_end/lib/src/fasta/source/source_constructor_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_constructor_builder.dart @@ -238,22 +238,24 @@ class DeclaredSourceConstructorBuilder extends SourceFunctionBuilderImpl } if (_hasSuperInitializingFormals) { + List? initializers; if (beginInitializers != null) { BodyBuilder bodyBuilder = library.loader .createBodyBuilderForOutlineExpression( library, classBuilder, this, classBuilder.scope, fileUri); bodyBuilder.constantContext = ConstantContext.required; - bodyBuilder.parseInitializers(beginInitializers!, + initializers = bodyBuilder.parseInitializers(beginInitializers!, doFinishConstructor: false); } finalizeSuperInitializingFormals( - classHierarchy, _superParameterDefaultValueCloners); + classHierarchy, _superParameterDefaultValueCloners, initializers); } } _hasFormalsInferred = true; } - ConstructorBuilder? _computeSuperTargetBuilder() { + ConstructorBuilder? _computeSuperTargetBuilder( + List? initializers) { Constructor superTarget; ClassBuilder superclassBuilder; @@ -279,9 +281,10 @@ class DeclaredSourceConstructorBuilder extends SourceFunctionBuilderImpl return null; } - if (constructor.initializers.isNotEmpty && - constructor.initializers.last is SuperInitializer) { - superTarget = (constructor.initializers.last as SuperInitializer).target; + if (initializers != null && + initializers.isNotEmpty && + initializers.last is SuperInitializer) { + superTarget = (initializers.last as SuperInitializer).target; } else { MemberBuilder? memberBuilder = superclassBuilder.constructors .lookup("", charOffset, library.fileUri); @@ -299,8 +302,10 @@ class DeclaredSourceConstructorBuilder extends SourceFunctionBuilderImpl return constructorBuilder is ConstructorBuilder ? constructorBuilder : null; } - void finalizeSuperInitializingFormals(ClassHierarchy classHierarchy, - List synthesizedFunctionNodes) { + void finalizeSuperInitializingFormals( + ClassHierarchy classHierarchy, + List synthesizedFunctionNodes, + List? initializers) { if (formals == null) return; if (!_hasSuperInitializingFormals) return; @@ -312,7 +317,8 @@ class DeclaredSourceConstructorBuilder extends SourceFunctionBuilderImpl } } - ConstructorBuilder? superTargetBuilder = _computeSuperTargetBuilder(); + ConstructorBuilder? superTargetBuilder = + _computeSuperTargetBuilder(initializers); Constructor superTarget; List? superFormals; if (superTargetBuilder is DeclaredSourceConstructorBuilder) { @@ -468,7 +474,8 @@ class DeclaredSourceConstructorBuilder extends SourceFunctionBuilderImpl void addSuperParameterDefaultValueCloners( List synthesizedFunctionNodes) { - ConstructorBuilder? superTargetBuilder = _computeSuperTargetBuilder(); + ConstructorBuilder? superTargetBuilder = + _computeSuperTargetBuilder(constructor.initializers); if (superTargetBuilder is DeclaredSourceConstructorBuilder) { superTargetBuilder .addSuperParameterDefaultValueCloners(synthesizedFunctionNodes); diff --git a/pkg/front_end/test/macros/macro_test.dart b/pkg/front_end/test/macros/macro_test.dart index ce0398970b7b2..910c3e1de0d87 100644 --- a/pkg/front_end/test/macros/macro_test.dart +++ b/pkg/front_end/test/macros/macro_test.dart @@ -282,7 +282,7 @@ class TestMacroExecutor implements MacroExecutor { @override String buildAugmentationLibrary(Iterable macroResults, - Uri Function(Identifier) resolveIdentifier) { + ResolvedIdentifier Function(Identifier) resolveIdentifier) { // TODO: implement buildAugmentationLibrary throw UnimplementedError(); } diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt index 34234975cb42a..10299a16ec4d1 100644 --- a/pkg/front_end/test/spell_checking_list_code.txt +++ b/pkg/front_end/test/spell_checking_list_code.txt @@ -943,6 +943,7 @@ q'i qi qm quad +qualify quantified queries quick @@ -1369,6 +1370,7 @@ unordered unpaired unparsed unpleasant +unqualified unreachable unseen unset diff --git a/pkg/front_end/testcases/super_parameters/issue48286.dart b/pkg/front_end/testcases/super_parameters/issue48286.dart new file mode 100644 index 0000000000000..042a99887bc50 --- /dev/null +++ b/pkg/front_end/testcases/super_parameters/issue48286.dart @@ -0,0 +1,18 @@ +// Copyright (c) 2022, 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 S { + num n; + T t; + S(this.n, this.t); + S.named(this.t, this.n); +} + +class C extends S { + C.constr1(super.n, String s, super.t); + C.constr2(int i, super.n, String s, super.t) : super(); + C.constr3(int i, super.t, String s, super.n) : super.named(); +} + +main() {} diff --git a/pkg/front_end/testcases/super_parameters/issue48286.dart.strong.expect b/pkg/front_end/testcases/super_parameters/issue48286.dart.strong.expect new file mode 100644 index 0000000000000..540907761434e --- /dev/null +++ b/pkg/front_end/testcases/super_parameters/issue48286.dart.strong.expect @@ -0,0 +1,26 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +class S extends core::Object { + field core::num n; + covariant-by-class field self::S::T% t; + constructor •(core::num n, self::S::T% t) → self::S + : self::S::n = n, self::S::t = t, super core::Object::•() + ; + constructor named(self::S::T% t, core::num n) → self::S + : self::S::t = t, self::S::n = n, super core::Object::•() + ; +} +class C extends self::S { + constructor constr1(core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr2(core::int i, core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr3(core::int i, self::C::T% t, core::String s, core::num n) → self::C + : super self::S::named(t, n) + ; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/super_parameters/issue48286.dart.strong.transformed.expect b/pkg/front_end/testcases/super_parameters/issue48286.dart.strong.transformed.expect new file mode 100644 index 0000000000000..540907761434e --- /dev/null +++ b/pkg/front_end/testcases/super_parameters/issue48286.dart.strong.transformed.expect @@ -0,0 +1,26 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +class S extends core::Object { + field core::num n; + covariant-by-class field self::S::T% t; + constructor •(core::num n, self::S::T% t) → self::S + : self::S::n = n, self::S::t = t, super core::Object::•() + ; + constructor named(self::S::T% t, core::num n) → self::S + : self::S::t = t, self::S::n = n, super core::Object::•() + ; +} +class C extends self::S { + constructor constr1(core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr2(core::int i, core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr3(core::int i, self::C::T% t, core::String s, core::num n) → self::C + : super self::S::named(t, n) + ; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/super_parameters/issue48286.dart.textual_outline.expect b/pkg/front_end/testcases/super_parameters/issue48286.dart.textual_outline.expect new file mode 100644 index 0000000000000..9eae54abdf7a6 --- /dev/null +++ b/pkg/front_end/testcases/super_parameters/issue48286.dart.textual_outline.expect @@ -0,0 +1,12 @@ +class S { + num n; + T t; + S(this.n, this.t); + S.named(this.t, this.n); +} +class C extends S { + C.constr1(super.n, String s, super.t); + C.constr2(int i, super.n, String s, super.t) : super(); + C.constr3(int i, super.t, String s, super.n) : super.named(); +} +main() {} diff --git a/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.expect b/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.expect new file mode 100644 index 0000000000000..540907761434e --- /dev/null +++ b/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.expect @@ -0,0 +1,26 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +class S extends core::Object { + field core::num n; + covariant-by-class field self::S::T% t; + constructor •(core::num n, self::S::T% t) → self::S + : self::S::n = n, self::S::t = t, super core::Object::•() + ; + constructor named(self::S::T% t, core::num n) → self::S + : self::S::t = t, self::S::n = n, super core::Object::•() + ; +} +class C extends self::S { + constructor constr1(core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr2(core::int i, core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr3(core::int i, self::C::T% t, core::String s, core::num n) → self::C + : super self::S::named(t, n) + ; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.modular.expect b/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.modular.expect new file mode 100644 index 0000000000000..540907761434e --- /dev/null +++ b/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.modular.expect @@ -0,0 +1,26 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +class S extends core::Object { + field core::num n; + covariant-by-class field self::S::T% t; + constructor •(core::num n, self::S::T% t) → self::S + : self::S::n = n, self::S::t = t, super core::Object::•() + ; + constructor named(self::S::T% t, core::num n) → self::S + : self::S::t = t, self::S::n = n, super core::Object::•() + ; +} +class C extends self::S { + constructor constr1(core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr2(core::int i, core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr3(core::int i, self::C::T% t, core::String s, core::num n) → self::C + : super self::S::named(t, n) + ; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.outline.expect new file mode 100644 index 0000000000000..35398a6c0f028 --- /dev/null +++ b/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.outline.expect @@ -0,0 +1,22 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +class S extends core::Object { + field core::num n; + covariant-by-class field self::S::T% t; + constructor •(core::num n, self::S::T% t) → self::S + ; + constructor named(self::S::T% t, core::num n) → self::S + ; +} +class C extends self::S { + constructor constr1(core::num n, core::String s, self::C::T% t) → self::C + ; + constructor constr2(core::int i, core::num n, core::String s, self::C::T% t) → self::C + ; + constructor constr3(core::int i, self::C::T% t, core::String s, core::num n) → self::C + ; +} +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.transformed.expect b/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.transformed.expect new file mode 100644 index 0000000000000..540907761434e --- /dev/null +++ b/pkg/front_end/testcases/super_parameters/issue48286.dart.weak.transformed.expect @@ -0,0 +1,26 @@ +library /*isNonNullableByDefault*/; +import self as self; +import "dart:core" as core; + +class S extends core::Object { + field core::num n; + covariant-by-class field self::S::T% t; + constructor •(core::num n, self::S::T% t) → self::S + : self::S::n = n, self::S::t = t, super core::Object::•() + ; + constructor named(self::S::T% t, core::num n) → self::S + : self::S::t = t, self::S::n = n, super core::Object::•() + ; +} +class C extends self::S { + constructor constr1(core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr2(core::int i, core::num n, core::String s, self::C::T% t) → self::C + : super self::S::•(n, t) + ; + constructor constr3(core::int i, self::C::T% t, core::String s, core::num n) → self::C + : super self::S::named(t, n) + ; +} +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/super_parameters/simple_inference.dart.strong.expect b/pkg/front_end/testcases/super_parameters/simple_inference.dart.strong.expect index 2422e10cf3018..8e3046a456229 100644 --- a/pkg/front_end/testcases/super_parameters/simple_inference.dart.strong.expect +++ b/pkg/front_end/testcases/super_parameters/simple_inference.dart.strong.expect @@ -27,8 +27,8 @@ class B1 extends self::A1 { constructor named2(core::int foo) → self::B1 : super self::A1::named2(foo) ; - constructor named3({required dynamic foo = #C1}) → self::B1 - : super self::A1::named3(foo: foo as{TypeError,ForDynamic,ForNonNullableByDefault} core::int) + constructor named3({required core::int foo = #C1}) → self::B1 + : super self::A1::named3(foo: foo) ; } class A2 extends core::Object { diff --git a/pkg/front_end/testcases/super_parameters/simple_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/super_parameters/simple_inference.dart.strong.transformed.expect index 2422e10cf3018..8e3046a456229 100644 --- a/pkg/front_end/testcases/super_parameters/simple_inference.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/super_parameters/simple_inference.dart.strong.transformed.expect @@ -27,8 +27,8 @@ class B1 extends self::A1 { constructor named2(core::int foo) → self::B1 : super self::A1::named2(foo) ; - constructor named3({required dynamic foo = #C1}) → self::B1 - : super self::A1::named3(foo: foo as{TypeError,ForDynamic,ForNonNullableByDefault} core::int) + constructor named3({required core::int foo = #C1}) → self::B1 + : super self::A1::named3(foo: foo) ; } class A2 extends core::Object { diff --git a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.expect b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.expect index 2422e10cf3018..8e3046a456229 100644 --- a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.expect +++ b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.expect @@ -27,8 +27,8 @@ class B1 extends self::A1 { constructor named2(core::int foo) → self::B1 : super self::A1::named2(foo) ; - constructor named3({required dynamic foo = #C1}) → self::B1 - : super self::A1::named3(foo: foo as{TypeError,ForDynamic,ForNonNullableByDefault} core::int) + constructor named3({required core::int foo = #C1}) → self::B1 + : super self::A1::named3(foo: foo) ; } class A2 extends core::Object { diff --git a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.modular.expect b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.modular.expect index 2422e10cf3018..8e3046a456229 100644 --- a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.modular.expect +++ b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.modular.expect @@ -27,8 +27,8 @@ class B1 extends self::A1 { constructor named2(core::int foo) → self::B1 : super self::A1::named2(foo) ; - constructor named3({required dynamic foo = #C1}) → self::B1 - : super self::A1::named3(foo: foo as{TypeError,ForDynamic,ForNonNullableByDefault} core::int) + constructor named3({required core::int foo = #C1}) → self::B1 + : super self::A1::named3(foo: foo) ; } class A2 extends core::Object { diff --git a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.outline.expect index c7b816c0c6953..3d11aa3308aba 100644 --- a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.outline.expect +++ b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.outline.expect @@ -20,7 +20,7 @@ class B1 extends self::A1 { ; constructor named2(core::int foo) → self::B1 ; - constructor named3({required dynamic foo}) → self::B1 + constructor named3({required core::int foo}) → self::B1 ; } class A2 extends core::Object { diff --git a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.transformed.expect b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.transformed.expect index 2422e10cf3018..8e3046a456229 100644 --- a/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/super_parameters/simple_inference.dart.weak.transformed.expect @@ -27,8 +27,8 @@ class B1 extends self::A1 { constructor named2(core::int foo) → self::B1 : super self::A1::named2(foo) ; - constructor named3({required dynamic foo = #C1}) → self::B1 - : super self::A1::named3(foo: foo as{TypeError,ForDynamic,ForNonNullableByDefault} core::int) + constructor named3({required core::int foo = #C1}) → self::B1 + : super self::A1::named3(foo: foo) ; } class A2 extends core::Object { diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status index 8c015e461f392..bb12aa230f811 100644 --- a/pkg/front_end/testcases/textual_outline.status +++ b/pkg/front_end/testcases/textual_outline.status @@ -219,6 +219,7 @@ regress/issue_41265.crash: FormatterCrash super_parameters/circular_dependency_inference: FormatterCrash super_parameters/default_values: FormatterCrash super_parameters/issue48142: FormatterCrash +super_parameters/issue48286: FormatterCrash super_parameters/simple: FormatterCrash super_parameters/simple_inference: FormatterCrash super_parameters/simple_named_super_parameters: FormatterCrash diff --git a/tools/VERSION b/tools/VERSION index 37044ab1fb9ea..19760f994c5bd 100644 --- a/tools/VERSION +++ b/tools/VERSION @@ -27,5 +27,5 @@ CHANNEL dev MAJOR 2 MINOR 17 PATCH 0 -PRERELEASE 95 +PRERELEASE 96 PRERELEASE_PATCH 0 \ No newline at end of file