diff --git a/pkg/dev_compiler/lib/src/compiler/shared_command.dart b/pkg/dev_compiler/lib/src/compiler/shared_command.dart index 77fc6154096..f70d35bfe00 100644 --- a/pkg/dev_compiler/lib/src/compiler/shared_command.dart +++ b/pkg/dev_compiler/lib/src/compiler/shared_command.dart @@ -238,9 +238,6 @@ class SharedCompilerOptions { // that build systems do not depend on passing windows-style paths here. return p.toUri(moduleName).toString(); } - - // TODO(nshahan) Cleanup when NNBD graduates experimental status. - bool get enableNullSafety => experiments['non-nullable'] ?? false; } /// Finds explicit module names of the form `path=name` in [summaryPaths], diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart index e0a610ae1cd..605c339bf9f 100644 --- a/pkg/dev_compiler/lib/src/kernel/command.dart +++ b/pkg/dev_compiler/lib/src/kernel/command.dart @@ -276,7 +276,7 @@ Future _compile(List args, additionalDills, DevCompilerTarget(TargetFlags( trackWidgetCreation: trackWidgetCreation, - enableNullSafety: options.enableNullSafety)), + enableNullSafety: options.soundNullSafety)), fileSystem: fileSystem, explicitExperimentalFlags: explicitExperimentalFlags, environmentDefines: declaredVariables, @@ -315,7 +315,7 @@ Future _compile(List args, inputDigests, DevCompilerTarget(TargetFlags( trackWidgetCreation: trackWidgetCreation, - enableNullSafety: options.enableNullSafety)), + enableNullSafety: options.soundNullSafety)), fileSystem: fileSystem, explicitExperimentalFlags: explicitExperimentalFlags, environmentDefines: declaredVariables, diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart index 3255b97debe..3919691fa0f 100644 --- a/pkg/dev_compiler/lib/src/kernel/compiler.dart +++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart @@ -3013,14 +3013,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor // * `class A extends B {...}` where B is the InterfaceType. // * Emitting non-null constructor calls. // * The InterfaceType is the Null type. - // * The types were written in JS context or as part of the dart:_runtime - // library. - if (!emitNullability || - type == _coreTypes.deprecatedNullType || - // TODO(38701) Remove these once the SDK has unforked and is running - // "opted-in" - !coreLibrary.isNonNullableByDefault && - (_isInForeignJS || isSdkInternalRuntime(currentLibrary))) { + if (!emitNullability || type == _coreTypes.deprecatedNullType) { return typeRep; }