diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart index 098e1aa3548..fb00d811451 100644 --- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart +++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart @@ -716,7 +716,9 @@ class KernelTarget extends TargetImplementation { Constructor? referenceFrom) { VariableDeclaration copyFormal(VariableDeclaration formal) { VariableDeclaration copy = new VariableDeclaration(formal.name, - isFinal: formal.isFinal, isConst: formal.isConst); + isFinal: formal.isFinal, + isConst: formal.isConst, + type: const UnknownType()); if (formal.type is! UnknownType) { copy.type = substitute(formal.type, substitutionMap); } else { @@ -1424,7 +1426,7 @@ class DelayedParameterType { void updateType() { // ignore: unnecessary_null_comparison - assert(source.type != null, "No type computed for $source."); + assert(source.type is! UnknownType, "No type computed for $source."); target.type = substitute(source.type, substitutionMap); } } diff --git a/pkg/front_end/testcases/incremental/type_change_on_recompile.yaml.world.1.expect b/pkg/front_end/testcases/incremental/type_change_on_recompile.yaml.world.1.expect index 59383356bce..38493c4c194 100644 --- a/pkg/front_end/testcases/incremental/type_change_on_recompile.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/type_change_on_recompile.yaml.world.1.expect @@ -43,7 +43,7 @@ library from "org-dartlang-test:///main.dart" as main { ; } abstract class _A&B&C&D extends main::_A&B&C implements main::D /*isAnonymousMixin,isEliminatedMixin*/ { - synthetic constructor named(dynamic _field) → main::_A&B&C&D* + synthetic constructor named(lib::E* _field) → main::_A&B&C&D* : super main::_A&B&C::named(_field) ; }