File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
pkg/compiler/lib/src/js_model Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -648,13 +648,17 @@ abstract class FunctionDataForEachParameterMixin implements FunctionData {
648
648
String name = parameter.name;
649
649
ConstantValue defaultValue;
650
650
if (parameter.isRequired) {
651
- defaultValue = elementMap.getRequiredSentinelConstantValue ();
651
+ if (elementMap.types.useLegacySubtyping) {
652
+ defaultValue = NullConstantValue ();
653
+ } else {
654
+ defaultValue = elementMap.getRequiredSentinelConstantValue ();
655
+ }
652
656
} else if (isOptional) {
653
657
if (parameter.initializer != null ) {
654
658
defaultValue =
655
659
elementMap.getConstantValue (memberContext, parameter.initializer);
656
660
} else {
657
- defaultValue = new NullConstantValue ();
661
+ defaultValue = NullConstantValue ();
658
662
}
659
663
}
660
664
f (type, name, defaultValue);
You can’t perform that action at this time.
0 commit comments