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 {
648648 String name = parameter.name;
649649 ConstantValue defaultValue;
650650 if (parameter.isRequired) {
651- defaultValue = elementMap.getRequiredSentinelConstantValue ();
651+ if (elementMap.types.useLegacySubtyping) {
652+ defaultValue = NullConstantValue ();
653+ } else {
654+ defaultValue = elementMap.getRequiredSentinelConstantValue ();
655+ }
652656 } else if (isOptional) {
653657 if (parameter.initializer != null ) {
654658 defaultValue =
655659 elementMap.getConstantValue (memberContext, parameter.initializer);
656660 } else {
657- defaultValue = new NullConstantValue ();
661+ defaultValue = NullConstantValue ();
658662 }
659663 }
660664 f (type, name, defaultValue);
You can’t perform that action at this time.
0 commit comments