diff --git a/pkg/compiler/test/codegen/codegen_test_helper.dart b/pkg/compiler/test/codegen/codegen_test_helper.dart index b07f28acb12..f28f67042b3 100644 --- a/pkg/compiler/test/codegen/codegen_test_helper.dart +++ b/pkg/compiler/test/codegen/codegen_test_helper.dart @@ -33,7 +33,7 @@ runTests(List args, [int shardIndex]) { shards: 2, directory: 'data', skip: skip, - options: ['--enable-experiment=non-nullable', Flags.soundNullSafety]); + options: [Flags.soundNullSafety]); } runTests2(List args, [int shardIndex]) { diff --git a/pkg/compiler/tool/modular_test_suite.dart b/pkg/compiler/tool/modular_test_suite.dart index 2809f338efa..0aa6ebeb10b 100644 --- a/pkg/compiler/tool/modular_test_suite.dart +++ b/pkg/compiler/tool/modular_test_suite.dart @@ -219,7 +219,6 @@ class SourceToDillStep implements IOModularStep { .expand((m) => ['--input-linked', '${toUri(m, dillId)}'])), ...(sources.expand((String uri) => ['--source', uri])), ...(flags.expand((String flag) => ['--enable-experiment', flag])), - '--enable-experiment=non-nullable', ]; var result = diff --git a/pkg/dartdev/test/commands/pub_test.dart b/pkg/dartdev/test/commands/pub_test.dart index e1648585f34..ab5b715a924 100644 --- a/pkg/dartdev/test/commands/pub_test.dart +++ b/pkg/dartdev/test/commands/pub_test.dart @@ -71,26 +71,6 @@ void pub() { expect(result.stderr, result2.stderr); }); - test('run --enable-experiment', () { - p = project(); - p.file('bin/main.dart', - "void main() { int? a; a = null; print('a is \$a.'); }"); - - // run 'pub get' - p.runSync(['pub', 'get']); - - var result = p.runSync( - ['pub', 'run', '--enable-experiment=no-non-nullable', 'main.dart']); - - expect(result.exitCode, 254); - expect(result.stdout, isEmpty); - expect( - result.stderr, - contains('bin/main.dart:1:18: Error: This requires the null safety ' - 'language feature, which requires language version of 2.12 or ' - 'higher.\n')); - }); - test('failure', () { p = project(mainSrc: 'int get foo => 1;\n'); var result = p.runSync(['pub', 'deps']); diff --git a/pkg/dev_compiler/tool/check_nnbd_sdk.dart b/pkg/dev_compiler/tool/check_nnbd_sdk.dart index c329e268cce..e4b9028f85d 100644 --- a/pkg/dev_compiler/tool/check_nnbd_sdk.dart +++ b/pkg/dev_compiler/tool/check_nnbd_sdk.dart @@ -117,15 +117,12 @@ main() {} var result = Process.runSync(dart.toFilePath(), [ // The NNBD dart binaries / snapshots require this flag to be enabled at // VM level. - if (analyzerSnapshot.contains('NNBD')) '--enable-experiment=non-nullable', analyzerSnapshot, '--dart-sdk=${sdkDir}', '--format', 'machine', '--sdk-warnings', '--no-hints', - '--enable-experiment', - 'non-nullable', emptyProgramUri.toFilePath() ]); diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart index 62858c6c262..674362177d9 100644 --- a/pkg/front_end/test/fasta/testing/suite.dart +++ b/pkg/front_end/test/fasta/testing/suite.dart @@ -788,7 +788,6 @@ class Run extends Step { try { var args = []; if (experimentalFlags[ExperimentalFlag.nonNullable] == true) { - args.add("--enable-experiment=non-nullable"); if (!context.weak) { args.add("--sound-null-safety"); } diff --git a/pkg/frontend_server/test/frontend_server_test.dart b/pkg/frontend_server/test/frontend_server_test.dart index ea7932f2531..ee69ecbe095 100644 --- a/pkg/frontend_server/test/frontend_server_test.dart +++ b/pkg/frontend_server/test/frontend_server_test.dart @@ -1761,7 +1761,6 @@ class BarState extends State { '--output-dill=${dillFile.path}', '--packages=${package_config.path}', '--target=dartdevc', - '--enable-experiment=non-nullable', file.path, ]; @@ -1915,7 +1914,6 @@ class BarState extends State { '--output-dill=${dillFile.path}', '--target=dartdevc', '--packages=${package_config.path}', - '--enable-experiment=non-nullable', ]; final StreamController> streamController = @@ -1996,7 +1994,6 @@ class BarState extends State { '--target=dartdevc', '--packages=${package_config.path}', '--experimental-emit-debug-metadata', - '--enable-experiment=non-nullable', ]; final StreamController> streamController = @@ -2243,7 +2240,6 @@ class BarState extends State { '--output-dill=${dillFile.path}', '--target=dartdevc', '--packages=${package_config.path}', - '--enable-experiment=non-nullable', ]; final StreamController> streamController = @@ -2362,7 +2358,6 @@ class BarState extends State { '--output-dill=${dillFile.path}', '--target=dartdevc', '--packages=${package_config.path}', - '--enable-experiment=non-nullable' ]; final StreamController> streamController = diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn index 40ff3036b6e..5eae1d91a49 100644 --- a/runtime/bin/BUILD.gn +++ b/runtime/bin/BUILD.gn @@ -496,7 +496,6 @@ gen_snapshot_action("generate_snapshot_bin") { isolate_snapshot_instructions, ] args = [ - "--enable-experiment=non-nullable", "--sound-null-safety", "--deterministic", "--snapshot_kind=" + dart_core_snapshot_kind, diff --git a/runtime/tests/vm/dart/null_safety_autodetection_in_kernel_compiler_test.dart b/runtime/tests/vm/dart/null_safety_autodetection_in_kernel_compiler_test.dart index 42446017089..1c13f65e072 100644 --- a/runtime/tests/vm/dart/null_safety_autodetection_in_kernel_compiler_test.dart +++ b/runtime/tests/vm/dart/null_safety_autodetection_in_kernel_compiler_test.dart @@ -29,7 +29,6 @@ compileAndRunTest(String comment, String expectedOutput) async { await runGenKernelWithoutStandardOptions('BUILD DILL FILE', [ "--platform", platformDill, - '--enable-experiment=non-nullable', '--output=$testDillPath', testScriptPath, ]); diff --git a/runtime/tests/vm/dart/type_casts_with_null_safety_autodetection_test.dart b/runtime/tests/vm/dart/type_casts_with_null_safety_autodetection_test.dart index 4b38663b31e..67c7d85748f 100644 --- a/runtime/tests/vm/dart/type_casts_with_null_safety_autodetection_test.dart +++ b/runtime/tests/vm/dart/type_casts_with_null_safety_autodetection_test.dart @@ -22,7 +22,6 @@ runTest(String script, String output, String temp) async { // Do not add Platform.executableArguments into arguments to avoid passing // --sound-null-safety / --no-sound-null-safety arguments. final result = await runBinary("RUN $script", Platform.executable, [ - '--enable-experiment=non-nullable', '--deterministic', '--optimization-counter-threshold=10', '--packages=${Platform.packageConfig}', diff --git a/runtime/tests/vm/dart_2/null_safety_autodetection_in_kernel_compiler_test.dart b/runtime/tests/vm/dart_2/null_safety_autodetection_in_kernel_compiler_test.dart index 42446017089..1c13f65e072 100644 --- a/runtime/tests/vm/dart_2/null_safety_autodetection_in_kernel_compiler_test.dart +++ b/runtime/tests/vm/dart_2/null_safety_autodetection_in_kernel_compiler_test.dart @@ -29,7 +29,6 @@ compileAndRunTest(String comment, String expectedOutput) async { await runGenKernelWithoutStandardOptions('BUILD DILL FILE', [ "--platform", platformDill, - '--enable-experiment=non-nullable', '--output=$testDillPath', testScriptPath, ]); diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn index 6fca24923c1..93534debbd1 100644 --- a/runtime/vm/BUILD.gn +++ b/runtime/vm/BUILD.gn @@ -183,7 +183,6 @@ template("gen_vm_platform") { args += [ "-Ddart.vm.product=$is_product_flag", "-Ddart.isVM=true", - "--enable-experiment=non-nullable", "--nnbd-agnostic", ] if (defined(invoker.exclude_source) && invoker.exclude_source) { diff --git a/sdk/bin/dart2js b/sdk/bin/dart2js index 9c562ecfcee..cfc91b1d759 100755 --- a/sdk/bin/dart2js +++ b/sdk/bin/dart2js @@ -52,4 +52,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)" DART2JS="package:compiler/src/dart2js.dart" -exec "$DART" "--packages=$DART_ROOT/.packages" --enable-experiment=non-nullable "${EXTRA_VM_OPTIONS[@]}" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@" +exec "$DART" "--packages=$DART_ROOT/.packages" "${EXTRA_VM_OPTIONS[@]}" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@" diff --git a/sdk/bin/dart2js_sdk b/sdk/bin/dart2js_sdk index 03999f9d6c8..e7999b47af8 100755 --- a/sdk/bin/dart2js_sdk +++ b/sdk/bin/dart2js_sdk @@ -55,4 +55,4 @@ if [[ $DART_VM_OPTIONS ]]; then EXTRA_VM_OPTIONS+=("${OPTIONS[@]}") fi -exec "$DART" --enable-experiment=non-nullable "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "${EXTRA_OPTIONS[@]}" "$@" +exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "${EXTRA_OPTIONS[@]}" "$@" diff --git a/tests/language/nnbd/flow_analysis/issue41981_error_test.dart b/tests/language/nnbd/flow_analysis/issue41981_error_test.dart index 6fc5ceb7395..905982aee08 100644 --- a/tests/language/nnbd/flow_analysis/issue41981_error_test.dart +++ b/tests/language/nnbd/flow_analysis/issue41981_error_test.dart @@ -7,7 +7,6 @@ // variable, because promotion to `Never` causes the code to be considered // unreachable. -// SharedOptions=--enable-experiment=non-nullable main() { late int i; diff --git a/tests/language/nnbd/flow_analysis/issue43093_test.dart b/tests/language/nnbd/flow_analysis/issue43093_test.dart index a0b95868839..ce30ab66d17 100644 --- a/tests/language/nnbd/flow_analysis/issue43093_test.dart +++ b/tests/language/nnbd/flow_analysis/issue43093_test.dart @@ -6,7 +6,6 @@ // expression would corrupt the state of flow analysis, causing a crash when // trying to finish analyzing an enclosing `if` statement. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; class C { diff --git a/tests/language/nnbd/flow_analysis/late_var_assigned_in_try_test.dart b/tests/language/nnbd/flow_analysis/late_var_assigned_in_try_test.dart index f0fca1a4c7e..9b71ca5fdb8 100644 --- a/tests/language/nnbd/flow_analysis/late_var_assigned_in_try_test.dart +++ b/tests/language/nnbd/flow_analysis/late_var_assigned_in_try_test.dart @@ -6,7 +6,6 @@ // read in a catch or finally block, that there is no compile-time error, // because the assignment might happen prior to the exception occurring. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; void tryCatch() { diff --git a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_local_function_ok_test.dart b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_local_function_ok_test.dart index aaf6a877f48..cee3a109f01 100644 --- a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_local_function_ok_test.dart +++ b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_local_function_ok_test.dart @@ -7,7 +7,6 @@ // that the assignment might occur before the read, that there is no // compile-time error. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; // First scenario: the variable is written inside the function, and the read diff --git a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_loop_test.dart b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_loop_test.dart index 09eef1ce31e..46f549c6aa5 100644 --- a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_loop_test.dart +++ b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_loop_test.dart @@ -7,7 +7,6 @@ // that there is no compile-time error, because the assignment may happen in an // earlier iteration than the read. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; void forLoop() { diff --git a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_error_test.dart b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_error_test.dart index b8f5e63cc16..5c507850093 100644 --- a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_error_test.dart +++ b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_error_test.dart @@ -8,7 +8,6 @@ // compile-time error, because the variable is unassigned on all possible // control flow paths to the read. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; void switchBad(int value) { diff --git a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_test.dart b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_test.dart index edb6b6ec4f8..8d2b6dfa108 100644 --- a/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_test.dart +++ b/tests/language/nnbd/flow_analysis/late_var_used_before_assignment_in_switch_test.dart @@ -7,7 +7,6 @@ // the assignment occurs somewhere in the switch, that there is no compile-time // error, because the assignment may happen prior to a branch to the label. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; void switchOk(int one) { diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_error_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_error_test.dart index c7aaf26c826..f6135fb3bfd 100644 --- a/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_error_test.dart +++ b/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_error_test.dart @@ -5,7 +5,6 @@ // This test verifies that if a read is performed on a getter whose type is // `Never?`, the resulting code block is considered reachable by flow analysis. -// SharedOptions=--enable-experiment=non-nullable Never? get neverQuestionGetter => null; diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_test.dart index af541803ce8..26d501119cc 100644 --- a/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_test.dart +++ b/tests/language/nnbd/flow_analysis/unreachable_via_getter_get_test.dart @@ -5,7 +5,6 @@ // This test verifies that if a read is performed on a getter whose type is // `Never`, the resulting code block is considered unreachable by flow analysis. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; Never get neverGetter => throw 'x'; diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_invocation_error_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_invocation_error_test.dart index 8cd5ce72d90..d8363045c17 100644 --- a/tests/language/nnbd/flow_analysis/unreachable_via_invocation_error_test.dart +++ b/tests/language/nnbd/flow_analysis/unreachable_via_invocation_error_test.dart @@ -5,7 +5,6 @@ // This test verifies that if a method is invoked whose return type is `Never?`, // the resulting code block is considered reachable by flow analysis. -// SharedOptions=--enable-experiment=non-nullable Never? neverQuestionFunction() => null; diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_invocation_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_invocation_test.dart index d059c4da54c..657cc09f645 100644 --- a/tests/language/nnbd/flow_analysis/unreachable_via_invocation_test.dart +++ b/tests/language/nnbd/flow_analysis/unreachable_via_invocation_test.dart @@ -5,7 +5,6 @@ // This test verifies that if a method is invoked whose return type is `Never`, // the resulting code block is considered unreachable by flow analysis. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; Never neverFunction() => throw 'x'; diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_promotion_error_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_promotion_error_test.dart index 46875979c54..0e12a222088 100644 --- a/tests/language/nnbd/flow_analysis/unreachable_via_promotion_error_test.dart +++ b/tests/language/nnbd/flow_analysis/unreachable_via_promotion_error_test.dart @@ -6,7 +6,6 @@ // resulting code block is considered reachable by flow analysis. This is in // contrast to promotion to `Never`, which is considered unreachable. -// SharedOptions=--enable-experiment=non-nullable void promoteViaIsCheck(Object x, Object? y) { if (x is! int) { if (y is Never?) { diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_promotion_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_promotion_test.dart index 3bcc228b405..ef4df3bad57 100644 --- a/tests/language/nnbd/flow_analysis/unreachable_via_promotion_test.dart +++ b/tests/language/nnbd/flow_analysis/unreachable_via_promotion_test.dart @@ -6,7 +6,6 @@ // via an explicit `is` check or a comparison to `null`), the resulting code // block is considered unreachable by flow analysis. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; void promoteViaIsCheck(Object x, Object? y) { diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_error_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_error_test.dart index aa97c73ee33..5c7634ea8ab 100644 --- a/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_error_test.dart +++ b/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_error_test.dart @@ -5,7 +5,6 @@ // This test verifies that if a read is performed on a variable whose type is // `Never?`, the resulting code block is considered reachable by flow analysis. -// SharedOptions=--enable-experiment=non-nullable void explicitNeverQuestionType(Object x, bool b) { Never? y = null; diff --git a/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_test.dart b/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_test.dart index 333029278e1..27b7d402960 100644 --- a/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_test.dart +++ b/tests/language/nnbd/flow_analysis/unreachable_via_variable_get_test.dart @@ -5,7 +5,6 @@ // This test verifies that if a read is performed on a variable whose type is // `Never`, the resulting code block is considered unreachable by flow analysis. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; void explicitNeverType(Never Function() f, Object x, bool b1, bool b2) { diff --git a/tests/language/nnbd/operator_type_test.dart b/tests/language/nnbd/operator_type_test.dart index 436ddda8799..497f0bb4748 100644 --- a/tests/language/nnbd/operator_type_test.dart +++ b/tests/language/nnbd/operator_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Tests that language operators and constructrs requiring non-nullable values // will not accept an operand with a nullable static type. diff --git a/tests/language/nnbd/resolution/issue40931_test.dart b/tests/language/nnbd/resolution/issue40931_test.dart index 0ea944d8589..65793246b2e 100644 --- a/tests/language/nnbd/resolution/issue40931_test.dart +++ b/tests/language/nnbd/resolution/issue40931_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable main() {} diff --git a/tests/language/nnbd/resolution/issue41479_test.dart b/tests/language/nnbd/resolution/issue41479_test.dart index bf6f6cd9c9b..f8180729dcc 100644 --- a/tests/language/nnbd/resolution/issue41479_test.dart +++ b/tests/language/nnbd/resolution/issue41479_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable main() { A a = A()..foo?.isEven; diff --git a/tests/language/nnbd/resolution/null_assertion_null_type_test.dart b/tests/language/nnbd/resolution/null_assertion_null_type_test.dart index 159731d2090..14f20600193 100644 --- a/tests/language/nnbd/resolution/null_assertion_null_type_test.dart +++ b/tests/language/nnbd/resolution/null_assertion_null_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that the trailing "!" properly promotes the type `Null` to `Never`, by // verifying that it's statically ok to pass it to a function expecting a diff --git a/tests/language/nnbd/resolution/question_dot_produces_nullable_type_test.dart b/tests/language/nnbd/resolution/question_dot_produces_nullable_type_test.dart index bfb938824d4..1df74a710a0 100644 --- a/tests/language/nnbd/resolution/question_dot_produces_nullable_type_test.dart +++ b/tests/language/nnbd/resolution/question_dot_produces_nullable_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable bool c = false; diff --git a/tests/language/nnbd/resolution/question_question_lub_test.dart b/tests/language/nnbd/resolution/question_question_lub_test.dart index beae0f82b8d..12bafaec8c5 100644 --- a/tests/language/nnbd/resolution/question_question_lub_test.dart +++ b/tests/language/nnbd/resolution/question_question_lub_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that `x ?? y` results in type LUB(x!, y) void main() { diff --git a/tests/language/nnbd/static_errors/await_in_late_local_variable_initializer_test.dart b/tests/language/nnbd/static_errors/await_in_late_local_variable_initializer_test.dart index 4f397269cb5..910106a1a2c 100644 --- a/tests/language/nnbd/static_errors/await_in_late_local_variable_initializer_test.dart +++ b/tests/language/nnbd/static_errors/await_in_late_local_variable_initializer_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is a compile time error for a `late` variable initializer // to use the `await` expression. diff --git a/tests/language/nnbd/static_errors/default_value_on_required_parameter_test.dart b/tests/language/nnbd/static_errors/default_value_on_required_parameter_test.dart index 73038979e2f..f5a45323c8c 100644 --- a/tests/language/nnbd/static_errors/default_value_on_required_parameter_test.dart +++ b/tests/language/nnbd/static_errors/default_value_on_required_parameter_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error if a required named parameter has a default value. main() {} diff --git a/tests/language/nnbd/static_errors/equals_parameter_made_nullable_at_invoke_test.dart b/tests/language/nnbd/static_errors/equals_parameter_made_nullable_at_invoke_test.dart index 2d6c7a6e6d6..f0d14418394 100644 --- a/tests/language/nnbd/static_errors/equals_parameter_made_nullable_at_invoke_test.dart +++ b/tests/language/nnbd/static_errors/equals_parameter_made_nullable_at_invoke_test.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; -// SharedOptions=--enable-experiment=non-nullable // Test that Object.operator==(Object o) is the signature of ==, but that we can // still compare nullable values to Object. diff --git a/tests/language/nnbd/static_errors/export_legacy_symbol_test.dart b/tests/language/nnbd/static_errors/export_legacy_symbol_test.dart index 25ea45cd8eb..18d348344a8 100644 --- a/tests/language/nnbd/static_errors/export_legacy_symbol_test.dart +++ b/tests/language/nnbd/static_errors/export_legacy_symbol_test.dart @@ -5,7 +5,6 @@ // Can't run in strong mode since it contains a legacy library. // Requirements=nnbd-weak -// SharedOptions=--enable-experiment=non-nullable import 'export_legacy_symbol_opted_out_library.dart'; diff --git a/tests/language/nnbd/static_errors/implicit_downcasts.dart b/tests/language/nnbd/static_errors/implicit_downcasts.dart index 6d8b7b49608..b19ce47628c 100644 --- a/tests/language/nnbd/static_errors/implicit_downcasts.dart +++ b/tests/language/nnbd/static_errors/implicit_downcasts.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error to do what was once allowed as an "implicit // downcast." diff --git a/tests/language/nnbd/static_errors/late_final_field_with_const_constructor_test.dart b/tests/language/nnbd/static_errors/late_final_field_with_const_constructor_test.dart index 30a931e21fb..d7b38988217 100644 --- a/tests/language/nnbd/static_errors/late_final_field_with_const_constructor_test.dart +++ b/tests/language/nnbd/static_errors/late_final_field_with_const_constructor_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is not a compile time error for a `final` variable to not have // an initializer if that variable is declared as `late`. diff --git a/tests/language/nnbd/static_errors/late_final_without_initializer.dart b/tests/language/nnbd/static_errors/late_final_without_initializer.dart index 83862107031..9938078d715 100644 --- a/tests/language/nnbd/static_errors/late_final_without_initializer.dart +++ b/tests/language/nnbd/static_errors/late_final_without_initializer.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is not a compile time error for a `final` variable to not have // an initializer if that variable is declared as `late`. diff --git a/tests/language/nnbd/static_errors/missing_default_value_for_parameter_test.dart b/tests/language/nnbd/static_errors/missing_default_value_for_parameter_test.dart index ade2f39cc9f..08b70532cad 100644 --- a/tests/language/nnbd/static_errors/missing_default_value_for_parameter_test.dart +++ b/tests/language/nnbd/static_errors/missing_default_value_for_parameter_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error if an optional parameter (named or otherwise) with // no default value has a potentially non-nullable type. diff --git a/tests/language/nnbd/static_errors/missing_required_argument_test.dart b/tests/language/nnbd/static_errors/missing_required_argument_test.dart index 630c53df257..f1201b5098b 100644 --- a/tests/language/nnbd/static_errors/missing_required_argument_test.dart +++ b/tests/language/nnbd/static_errors/missing_required_argument_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error if a named parameter that is part of a required // group is not bound to an argument at a call site. diff --git a/tests/language/nnbd/static_errors/non_null_assertion_test.dart b/tests/language/nnbd/static_errors/non_null_assertion_test.dart index 670a5b0cf0a..b014da26ff5 100644 --- a/tests/language/nnbd/static_errors/non_null_assertion_test.dart +++ b/tests/language/nnbd/static_errors/non_null_assertion_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void main() { void x; int i; diff --git a/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_else_test.dart b/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_else_test.dart index 204382886eb..74c16a1753c 100644 --- a/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_else_test.dart +++ b/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_else_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // It is an error if a potentially non-nullable local variable which has no // initializer expression and is not marked `late` is used before it is diff --git a/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_test.dart b/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_test.dart index 5eb19ce2d87..3748a9ecf34 100644 --- a/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_test.dart +++ b/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // It is an error if a potentially non-nullable local variable which has no // initializer expression and is not marked `late` is used before it is diff --git a/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_then_test.dart b/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_then_test.dart index 2b9496cbd04..8a959fbaa93 100644 --- a/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_then_test.dart +++ b/tests/language/nnbd/static_errors/not_assigned_local_if_then_else_then_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // It is an error if a potentially non-nullable local variable which has no // initializer expression and is not marked `late` is used before it is diff --git a/tests/language/nnbd/static_errors/not_assigned_local_if_then_test.dart b/tests/language/nnbd/static_errors/not_assigned_local_if_then_test.dart index 7c65fb51b3c..986b66104c6 100644 --- a/tests/language/nnbd/static_errors/not_assigned_local_if_then_test.dart +++ b/tests/language/nnbd/static_errors/not_assigned_local_if_then_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // It is an error if a potentially non-nullable local variable which has no // initializer expression and is not marked `late` is used before it is diff --git a/tests/language/nnbd/static_errors/not_assigned_local_initializer_test.dart b/tests/language/nnbd/static_errors/not_assigned_local_initializer_test.dart index 099f3281eea..1edcb9c0b82 100644 --- a/tests/language/nnbd/static_errors/not_assigned_local_initializer_test.dart +++ b/tests/language/nnbd/static_errors/not_assigned_local_initializer_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // It is an error if a potentially non-nullable local variable which has no // initializer expression and is not marked `late` is used before it is diff --git a/tests/language/nnbd/static_errors/not_assigned_local_try_catch_body_catch_test.dart b/tests/language/nnbd/static_errors/not_assigned_local_try_catch_body_catch_test.dart index 94968d3d099..a08dd1dcb74 100644 --- a/tests/language/nnbd/static_errors/not_assigned_local_try_catch_body_catch_test.dart +++ b/tests/language/nnbd/static_errors/not_assigned_local_try_catch_body_catch_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // It is an error if a potentially non-nullable local variable which has no // initializer expression and is not marked `late` is used before it is diff --git a/tests/language/nnbd/static_errors/not_assigned_local_try_catch_body_test.dart b/tests/language/nnbd/static_errors/not_assigned_local_try_catch_body_test.dart index 05a86766c2d..e5ddbcfb792 100644 --- a/tests/language/nnbd/static_errors/not_assigned_local_try_catch_body_test.dart +++ b/tests/language/nnbd/static_errors/not_assigned_local_try_catch_body_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // It is an error if a potentially non-nullable local variable which has no // initializer expression and is not marked `late` is used before it is diff --git a/tests/language/nnbd/static_errors/not_assigned_local_while_true_break_after_test.dart b/tests/language/nnbd/static_errors/not_assigned_local_while_true_break_after_test.dart index 8c9a408c4e0..49dc8a808e1 100644 --- a/tests/language/nnbd/static_errors/not_assigned_local_while_true_break_after_test.dart +++ b/tests/language/nnbd/static_errors/not_assigned_local_while_true_break_after_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // It is an error if a potentially non-nullable local variable which has no // initializer expression and is not marked `late` is used before it is diff --git a/tests/language/nnbd/static_errors/not_assigned_local_while_true_break_before_test.dart b/tests/language/nnbd/static_errors/not_assigned_local_while_true_break_before_test.dart index d0443ad712b..1e0bbe89445 100644 --- a/tests/language/nnbd/static_errors/not_assigned_local_while_true_break_before_test.dart +++ b/tests/language/nnbd/static_errors/not_assigned_local_while_true_break_before_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // It is an error if a potentially non-nullable local variable which has no // initializer expression and is not marked `late` is used before it is diff --git a/tests/language/nnbd/static_errors/not_initialized_non_nullable_instance_field_test.dart b/tests/language/nnbd/static_errors/not_initialized_non_nullable_instance_field_test.dart index e48202d91d0..6ce07359e43 100644 --- a/tests/language/nnbd/static_errors/not_initialized_non_nullable_instance_field_test.dart +++ b/tests/language/nnbd/static_errors/not_initialized_non_nullable_instance_field_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error if an instance field with potentially non-nullable // type has no initializer expression and is not initialized in a constructor diff --git a/tests/language/nnbd/static_errors/not_initialized_non_nullable_static_field_test.dart b/tests/language/nnbd/static_errors/not_initialized_non_nullable_static_field_test.dart index a70142eeb83..4a5d07603a1 100644 --- a/tests/language/nnbd/static_errors/not_initialized_non_nullable_static_field_test.dart +++ b/tests/language/nnbd/static_errors/not_initialized_non_nullable_static_field_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error if a static field non-nullable type has no // initializer expression. diff --git a/tests/language/nnbd/static_errors/not_initialized_non_nullable_top_test.dart b/tests/language/nnbd/static_errors/not_initialized_non_nullable_top_test.dart index 28e55e4d32c..57c92c037b4 100644 --- a/tests/language/nnbd/static_errors/not_initialized_non_nullable_top_test.dart +++ b/tests/language/nnbd/static_errors/not_initialized_non_nullable_top_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error if a top level variable with non-nullable type has // no initializer expression. diff --git a/tests/language/nnbd/static_errors/nullable_function_types_test.dart b/tests/language/nnbd/static_errors/nullable_function_types_test.dart index dd994cd3958..12f2fc9f22a 100644 --- a/tests/language/nnbd/static_errors/nullable_function_types_test.dart +++ b/tests/language/nnbd/static_errors/nullable_function_types_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable class C { call() {} diff --git a/tests/language/nnbd/static_errors/nullable_supertype_test.dart b/tests/language/nnbd/static_errors/nullable_supertype_test.dart index 711fefdb4f5..44cd58aa788 100644 --- a/tests/language/nnbd/static_errors/nullable_supertype_test.dart +++ b/tests/language/nnbd/static_errors/nullable_supertype_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error to use a nullable type as a supertype. import 'package:expect/expect.dart'; diff --git a/tests/language/nnbd/static_errors/subtype_of_never_test.dart b/tests/language/nnbd/static_errors/subtype_of_never_test.dart index a19197cea82..63615623354 100644 --- a/tests/language/nnbd/static_errors/subtype_of_never_test.dart +++ b/tests/language/nnbd/static_errors/subtype_of_never_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error for a class to extend, implement, or mixin the type // Never. diff --git a/tests/language/nnbd/static_errors/super_equals_allows_null_test.dart b/tests/language/nnbd/static_errors/super_equals_allows_null_test.dart index 507a146c8d0..4a7f98ad941 100644 --- a/tests/language/nnbd/static_errors/super_equals_allows_null_test.dart +++ b/tests/language/nnbd/static_errors/super_equals_allows_null_test.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import "package:expect/expect.dart"; -// SharedOptions=--enable-experiment=non-nullable // Test that `super == x` is allowed when `x` has a nullable type, even if the // targeted definition of `operator==` has a parameter with a non-nullable type, diff --git a/tests/language/nnbd/static_errors/super_equals_disallows_non_matching_type_error_test.dart b/tests/language/nnbd/static_errors/super_equals_disallows_non_matching_type_error_test.dart index a2a81826b16..9f0c53c2718 100644 --- a/tests/language/nnbd/static_errors/super_equals_disallows_non_matching_type_error_test.dart +++ b/tests/language/nnbd/static_errors/super_equals_disallows_non_matching_type_error_test.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import "package:expect/expect.dart"; -// SharedOptions=--enable-experiment=non-nullable // Test that `super == x` is properly type checked against the target // `operator==` method. That is, the special allowance in the following spec diff --git a/tests/language/nnbd/static_errors/this_reference_in_late_field_test.dart b/tests/language/nnbd/static_errors/this_reference_in_late_field_test.dart index 0493a27fab2..3c3efd14332 100644 --- a/tests/language/nnbd/static_errors/this_reference_in_late_field_test.dart +++ b/tests/language/nnbd/static_errors/this_reference_in_late_field_test.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import "package:expect/expect.dart"; -// SharedOptions=--enable-experiment=non-nullable void main() { final c = C(); Expect.identical(c, c); diff --git a/tests/language/nnbd/static_errors/throw_of_invalid_type_test.dart b/tests/language/nnbd/static_errors/throw_of_invalid_type_test.dart index 564a7b4fd74..9a20a366e00 100644 --- a/tests/language/nnbd/static_errors/throw_of_invalid_type_test.dart +++ b/tests/language/nnbd/static_errors/throw_of_invalid_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error if the static type of `e` in the expression // `throw e` is not assignable to `Object`. diff --git a/tests/language/nnbd/static_errors/unchecked_use_of_nullable_cascaded_test.dart b/tests/language/nnbd/static_errors/unchecked_use_of_nullable_cascaded_test.dart index 9678ea9fb26..5773c435e6a 100644 --- a/tests/language/nnbd/static_errors/unchecked_use_of_nullable_cascaded_test.dart +++ b/tests/language/nnbd/static_errors/unchecked_use_of_nullable_cascaded_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error to use nullable types in unsound ways. void main() { diff --git a/tests/language/nnbd/static_errors/unchecked_use_of_nullable_test.dart b/tests/language/nnbd/static_errors/unchecked_use_of_nullable_test.dart index 4e23e5ff1c2..e4bbab63b4c 100644 --- a/tests/language/nnbd/static_errors/unchecked_use_of_nullable_test.dart +++ b/tests/language/nnbd/static_errors/unchecked_use_of_nullable_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that it is an error to use nullable types in unsound ways. void main() async { diff --git a/tests/language/nnbd/static_errors/use_nnbd_sdk_test.dart b/tests/language/nnbd/static_errors/use_nnbd_sdk_test.dart index e43cb638aaf..1f65c6a043f 100644 --- a/tests/language/nnbd/static_errors/use_nnbd_sdk_test.dart +++ b/tests/language/nnbd/static_errors/use_nnbd_sdk_test.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import "package:expect/expect.dart"; -// SharedOptions=--enable-experiment=non-nullable void main() { } diff --git a/tests/language/nnbd/syntax/cascade_nullcheck_test.dart b/tests/language/nnbd/syntax/cascade_nullcheck_test.dart index 7391fc0c9ad..f54a5d080c0 100644 --- a/tests/language/nnbd/syntax/cascade_nullcheck_test.dart +++ b/tests/language/nnbd/syntax/cascade_nullcheck_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import "package:expect/expect.dart"; diff --git a/tests/language/nnbd/syntax/class_member_declarations_error_test.dart b/tests/language/nnbd/syntax/class_member_declarations_error_test.dart index e78643e5c8b..40e2c44726d 100644 --- a/tests/language/nnbd/syntax/class_member_declarations_error_test.dart +++ b/tests/language/nnbd/syntax/class_member_declarations_error_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable class A { static late x1; diff --git a/tests/language/nnbd/syntax/class_member_declarations_test.dart b/tests/language/nnbd/syntax/class_member_declarations_test.dart index a6c8efd77cf..f53b467edc8 100644 --- a/tests/language/nnbd/syntax/class_member_declarations_test.dart +++ b/tests/language/nnbd/syntax/class_member_declarations_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable class A { static late final x2; diff --git a/tests/language/nnbd/syntax/late_modifier_bug_39658.dart b/tests/language/nnbd/syntax/late_modifier_bug_39658.dart index 3b8307a75a0..745e8f7a324 100644 --- a/tests/language/nnbd/syntax/late_modifier_bug_39658.dart +++ b/tests/language/nnbd/syntax/late_modifier_bug_39658.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; int initCalls = 0; diff --git a/tests/language/nnbd/syntax/late_modifier_edge_cases_test.dart b/tests/language/nnbd/syntax/late_modifier_edge_cases_test.dart index fddd83c93db..fbaf0e2ac10 100644 --- a/tests/language/nnbd/syntax/late_modifier_edge_cases_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_edge_cases_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; class A { diff --git a/tests/language/nnbd/syntax/late_modifier_error_test.dart b/tests/language/nnbd/syntax/late_modifier_error_test.dart index a21deb7422f..05ce870c61c 100644 --- a/tests/language/nnbd/syntax/late_modifier_error_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_error_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Invalid uses of "late" modifier diff --git a/tests/language/nnbd/syntax/late_modifier_final_field_test.dart b/tests/language/nnbd/syntax/late_modifier_final_field_test.dart index bfa9d7fdfdc..05df3457ac0 100644 --- a/tests/language/nnbd/syntax/late_modifier_final_field_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_final_field_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // VMOptions=--optimization_counter_threshold=10 import 'package:expect/expect.dart'; diff --git a/tests/language/nnbd/syntax/late_modifier_final_local_var_test.dart b/tests/language/nnbd/syntax/late_modifier_final_local_var_test.dart index cca2eaab589..14739b6a757 100644 --- a/tests/language/nnbd/syntax/late_modifier_final_local_var_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_final_local_var_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // VMOptions=--optimization_counter_threshold=10 import 'package:expect/expect.dart'; diff --git a/tests/language/nnbd/syntax/late_modifier_global_var_test.dart b/tests/language/nnbd/syntax/late_modifier_global_var_test.dart index b084f023ad6..95cb47f1ce0 100644 --- a/tests/language/nnbd/syntax/late_modifier_global_var_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_global_var_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; int initCalls = 0; diff --git a/tests/language/nnbd/syntax/late_modifier_local_var_test.dart b/tests/language/nnbd/syntax/late_modifier_local_var_test.dart index 88878bb7903..825d96e8ae2 100644 --- a/tests/language/nnbd/syntax/late_modifier_local_var_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_local_var_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // VMOptions=--optimization_counter_threshold=10 import 'package:expect/expect.dart'; diff --git a/tests/language/nnbd/syntax/late_modifier_non_final_field_test.dart b/tests/language/nnbd/syntax/late_modifier_non_final_field_test.dart index 1ebb8ee9708..cdd0979820b 100644 --- a/tests/language/nnbd/syntax/late_modifier_non_final_field_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_non_final_field_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // VMOptions=--optimization_counter_threshold=10 import 'package:expect/expect.dart'; diff --git a/tests/language/nnbd/syntax/late_modifier_static_field_test.dart b/tests/language/nnbd/syntax/late_modifier_static_field_test.dart index d536db667d0..64adb337d86 100644 --- a/tests/language/nnbd/syntax/late_modifier_static_field_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_static_field_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; int initCalls = 0; diff --git a/tests/language/nnbd/syntax/late_modifier_static_final_field_test.dart b/tests/language/nnbd/syntax/late_modifier_static_final_field_test.dart index 66fd9bb47a0..35920ea7c67 100644 --- a/tests/language/nnbd/syntax/late_modifier_static_final_field_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_static_final_field_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; int initCalls = 0; diff --git a/tests/language/nnbd/syntax/late_modifier_test.dart b/tests/language/nnbd/syntax/late_modifier_test.dart index bcd438535f3..3f2e3f0110e 100644 --- a/tests/language/nnbd/syntax/late_modifier_test.dart +++ b/tests/language/nnbd/syntax/late_modifier_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; late final int d = d_init(); diff --git a/tests/language/nnbd/syntax/non_null_assertion_test.dart b/tests/language/nnbd/syntax/non_null_assertion_test.dart index 265dfed4207..9d7a3e96d53 100644 --- a/tests/language/nnbd/syntax/non_null_assertion_test.dart +++ b/tests/language/nnbd/syntax/non_null_assertion_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Test that the trailing "!" is accepted after a sampling of expression // syntaxes. Verify that the compiler understands the resulting type to be diff --git a/tests/language/nnbd/syntax/null_assertion_ambiguous_test.dart b/tests/language/nnbd/syntax/null_assertion_ambiguous_test.dart index 131631e5382..8cb6e4aea71 100644 --- a/tests/language/nnbd/syntax/null_assertion_ambiguous_test.dart +++ b/tests/language/nnbd/syntax/null_assertion_ambiguous_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; import 'dart:async'; diff --git a/tests/language/nnbd/syntax/nullable_type_ambiguous_test.dart b/tests/language/nnbd/syntax/nullable_type_ambiguous_test.dart index 23565da1dd8..b00c18d92e6 100644 --- a/tests/language/nnbd/syntax/nullable_type_ambiguous_test.dart +++ b/tests/language/nnbd/syntax/nullable_type_ambiguous_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; class C { diff --git a/tests/language/nnbd/syntax/nullable_type_error_test.dart b/tests/language/nnbd/syntax/nullable_type_error_test.dart index 106cf2d4694..01112ab4fc1 100644 --- a/tests/language/nnbd/syntax/nullable_type_error_test.dart +++ b/tests/language/nnbd/syntax/nullable_type_error_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'dart:core'; import 'dart:core' as core; diff --git a/tests/language/nnbd/syntax/opt_out_nnbd_modifiers_test.dart b/tests/language/nnbd/syntax/opt_out_nnbd_modifiers_test.dart index 59d55dac280..d7d60cb79aa 100644 --- a/tests/language/nnbd/syntax/opt_out_nnbd_modifiers_test.dart +++ b/tests/language/nnbd/syntax/opt_out_nnbd_modifiers_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // @dart = 2.2 import 'package:expect/expect.dart'; diff --git a/tests/language/nnbd/syntax/required_modifier_error_test.dart b/tests/language/nnbd/syntax/required_modifier_error_test.dart index 3312580be3c..24ac35d9853 100644 --- a/tests/language/nnbd/syntax/required_modifier_error_test.dart +++ b/tests/language/nnbd/syntax/required_modifier_error_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable // Invalid uses of "required" modifier diff --git a/tests/language/nnbd/syntax/required_modifier_test.dart b/tests/language/nnbd/syntax/required_modifier_test.dart index 423f22e0326..a5640c685fe 100644 --- a/tests/language/nnbd/syntax/required_modifier_test.dart +++ b/tests/language/nnbd/syntax/required_modifier_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; int f({required int i}) => i + 1; diff --git a/tests/language/nnbd/type_promotion/assignment_inference_after_null_check_test.dart b/tests/language/nnbd/type_promotion/assignment_inference_after_null_check_test.dart index 220bfbe22b6..fbeb0be3233 100644 --- a/tests/language/nnbd/type_promotion/assignment_inference_after_null_check_test.dart +++ b/tests/language/nnbd/type_promotion/assignment_inference_after_null_check_test.dart @@ -7,7 +7,6 @@ // inference. This test makes sure that the type argument information is // appropriately preserved. -// SharedOptions=--enable-experiment=non-nullable void f(List? x) { if (x == null) { diff --git a/tests/language/nnbd/type_promotion/assignment_test.dart b/tests/language/nnbd/type_promotion/assignment_test.dart index ab93abbd321..1c085e01af6 100644 --- a/tests/language/nnbd/type_promotion/assignment_test.dart +++ b/tests/language/nnbd/type_promotion/assignment_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { if (x is String) { diff --git a/tests/language/nnbd/type_promotion/conditional_both_test.dart b/tests/language/nnbd/type_promotion/conditional_both_test.dart index a663af582f7..65dccbc8356 100644 --- a/tests/language/nnbd/type_promotion/conditional_both_test.dart +++ b/tests/language/nnbd/type_promotion/conditional_both_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(bool b, Object x) { b ? ((x is String) || (throw 1)) : ((x is String) || (throw 2)); diff --git a/tests/language/nnbd/type_promotion/do_condition_is_not_type_test.dart b/tests/language/nnbd/type_promotion/do_condition_is_not_type_test.dart index c5b74208938..f0117658066 100644 --- a/tests/language/nnbd/type_promotion/do_condition_is_not_type_test.dart +++ b/tests/language/nnbd/type_promotion/do_condition_is_not_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { do { diff --git a/tests/language/nnbd/type_promotion/do_condition_is_type_test.dart b/tests/language/nnbd/type_promotion/do_condition_is_type_test.dart index 83572cdefcb..db7988c08bb 100644 --- a/tests/language/nnbd/type_promotion/do_condition_is_type_test.dart +++ b/tests/language/nnbd/type_promotion/do_condition_is_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { do { diff --git a/tests/language/nnbd/type_promotion/do_outer_is_type_test.dart b/tests/language/nnbd/type_promotion/do_outer_is_type_test.dart index 06f0653a99d..31c13e80454 100644 --- a/tests/language/nnbd/type_promotion/do_outer_is_type_test.dart +++ b/tests/language/nnbd/type_promotion/do_outer_is_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(bool b, Object x) { if (x is String) { diff --git a/tests/language/nnbd/type_promotion/for_outer_is_type_test.dart b/tests/language/nnbd/type_promotion/for_outer_is_type_test.dart index 3aaed045691..3226b28cb41 100644 --- a/tests/language/nnbd/type_promotion/for_outer_is_type_test.dart +++ b/tests/language/nnbd/type_promotion/for_outer_is_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(bool b, Object x) { if (x is String) { diff --git a/tests/language/nnbd/type_promotion/function_expression_is_type_mutated_in_closure_test.dart b/tests/language/nnbd/type_promotion/function_expression_is_type_mutated_in_closure_test.dart index 058855ecd39..c527f6fb198 100644 --- a/tests/language/nnbd/type_promotion/function_expression_is_type_mutated_in_closure_test.dart +++ b/tests/language/nnbd/type_promotion/function_expression_is_type_mutated_in_closure_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f() { void g(Object x) { diff --git a/tests/language/nnbd/type_promotion/function_expression_is_type_test.dart b/tests/language/nnbd/type_promotion/function_expression_is_type_test.dart index 83200a78c9e..820996169d8 100644 --- a/tests/language/nnbd/type_promotion/function_expression_is_type_test.dart +++ b/tests/language/nnbd/type_promotion/function_expression_is_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f() { void g(Object x) { diff --git a/tests/language/nnbd/type_promotion/function_expression_outer_is_type_assigned_outside_test.dart b/tests/language/nnbd/type_promotion/function_expression_outer_is_type_assigned_outside_test.dart index dd1df88f93f..aeaa80155b4 100644 --- a/tests/language/nnbd/type_promotion/function_expression_outer_is_type_assigned_outside_test.dart +++ b/tests/language/nnbd/type_promotion/function_expression_outer_is_type_assigned_outside_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { late void Function() g; diff --git a/tests/language/nnbd/type_promotion/if_is_not_type_test.dart b/tests/language/nnbd/type_promotion/if_is_not_type_test.dart index 4fb31b7d58a..16b109a699d 100644 --- a/tests/language/nnbd/type_promotion/if_is_not_type_test.dart +++ b/tests/language/nnbd/type_promotion/if_is_not_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { if (x is! String) { diff --git a/tests/language/nnbd/type_promotion/if_is_type_test.dart b/tests/language/nnbd/type_promotion/if_is_type_test.dart index dc97344991b..62850191c46 100644 --- a/tests/language/nnbd/type_promotion/if_is_type_test.dart +++ b/tests/language/nnbd/type_promotion/if_is_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { if (x is String) { diff --git a/tests/language/nnbd/type_promotion/logical_or_throw_test.dart b/tests/language/nnbd/type_promotion/logical_or_throw_test.dart index e8c7e8b152e..55dbc0b7602 100644 --- a/tests/language/nnbd/type_promotion/logical_or_throw_test.dart +++ b/tests/language/nnbd/type_promotion/logical_or_throw_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { x is String || (throw 42); diff --git a/tests/language/nnbd/type_promotion/null_type_insufficient_for_equals_null_check_error_test.dart b/tests/language/nnbd/type_promotion/null_type_insufficient_for_equals_null_check_error_test.dart index 30e882f0e1f..55d529b9104 100644 --- a/tests/language/nnbd/type_promotion/null_type_insufficient_for_equals_null_check_error_test.dart +++ b/tests/language/nnbd/type_promotion/null_type_insufficient_for_equals_null_check_error_test.dart @@ -8,7 +8,6 @@ // expression `(x = null)`). This test demonstrates the problem with `(x = // null)` and checks a few other cases. -// SharedOptions=--enable-experiment=non-nullable void assignNullRhs(int? x) { if (x != (x = null)) { diff --git a/tests/language/nnbd/type_promotion/promoted_lhs_used_as_assignment_context_test.dart b/tests/language/nnbd/type_promotion/promoted_lhs_used_as_assignment_context_test.dart index 245ec8b8053..149afdd32da 100644 --- a/tests/language/nnbd/type_promotion/promoted_lhs_used_as_assignment_context_test.dart +++ b/tests/language/nnbd/type_promotion/promoted_lhs_used_as_assignment_context_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable import 'package:expect/expect.dart'; diff --git a/tests/language/nnbd/type_promotion/try_catch_assigned_body_test.dart b/tests/language/nnbd/type_promotion/try_catch_assigned_body_test.dart index 4a3bef45f44..baf48669ff6 100644 --- a/tests/language/nnbd/type_promotion/try_catch_assigned_body_test.dart +++ b/tests/language/nnbd/type_promotion/try_catch_assigned_body_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { if (x is! String) return; diff --git a/tests/language/nnbd/type_promotion/try_catch_catch_finally_outer_is_type_test.dart b/tests/language/nnbd/type_promotion/try_catch_catch_finally_outer_is_type_test.dart index 41449dee24c..5e0bb5737f7 100644 --- a/tests/language/nnbd/type_promotion/try_catch_catch_finally_outer_is_type_test.dart +++ b/tests/language/nnbd/type_promotion/try_catch_catch_finally_outer_is_type_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { if (x is String) { diff --git a/tests/language/nnbd/type_promotion/try_catch_is_not_type_exit_body_catch_test.dart b/tests/language/nnbd/type_promotion/try_catch_is_not_type_exit_body_catch_test.dart index 9b2462c4a03..af75aaf549a 100644 --- a/tests/language/nnbd/type_promotion/try_catch_is_not_type_exit_body_catch_test.dart +++ b/tests/language/nnbd/type_promotion/try_catch_is_not_type_exit_body_catch_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { try { diff --git a/tests/language/nnbd/type_promotion/try_catch_is_not_type_exit_body_test.dart b/tests/language/nnbd/type_promotion/try_catch_is_not_type_exit_body_test.dart index 3d8ca81e5c9..7e9066a361b 100644 --- a/tests/language/nnbd/type_promotion/try_catch_is_not_type_exit_body_test.dart +++ b/tests/language/nnbd/type_promotion/try_catch_is_not_type_exit_body_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { try { diff --git a/tests/language/nnbd/type_promotion/try_finally_outer_is_type_assigned_body_test.dart b/tests/language/nnbd/type_promotion/try_finally_outer_is_type_assigned_body_test.dart index eeabbe7610b..3ce4f78c304 100644 --- a/tests/language/nnbd/type_promotion/try_finally_outer_is_type_assigned_body_test.dart +++ b/tests/language/nnbd/type_promotion/try_finally_outer_is_type_assigned_body_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { if (x is String) { diff --git a/tests/language/nnbd/type_promotion/try_finally_outer_is_type_assigned_finally_test.dart b/tests/language/nnbd/type_promotion/try_finally_outer_is_type_assigned_finally_test.dart index bca9b42e4d6..9722738837f 100644 --- a/tests/language/nnbd/type_promotion/try_finally_outer_is_type_assigned_finally_test.dart +++ b/tests/language/nnbd/type_promotion/try_finally_outer_is_type_assigned_finally_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { if (x is String) { diff --git a/tests/language/nnbd/type_promotion/while_condition_false_test.dart b/tests/language/nnbd/type_promotion/while_condition_false_test.dart index 8301ac953a7..1d76b9d7130 100644 --- a/tests/language/nnbd/type_promotion/while_condition_false_test.dart +++ b/tests/language/nnbd/type_promotion/while_condition_false_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { while (x is! String) { diff --git a/tests/language/nnbd/type_promotion/while_condition_true_test.dart b/tests/language/nnbd/type_promotion/while_condition_true_test.dart index 468b14ec62d..b29dfc3bd49 100644 --- a/tests/language/nnbd/type_promotion/while_condition_true_test.dart +++ b/tests/language/nnbd/type_promotion/while_condition_true_test.dart @@ -2,7 +2,6 @@ // 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. -// SharedOptions=--enable-experiment=non-nullable void f(Object x) { while (x is String) { diff --git a/tests/lib/isolate/detect_nullsafety_helper.dart b/tests/lib/isolate/detect_nullsafety_helper.dart index 7f66ab8fd1a..3171ef4bd15 100644 --- a/tests/lib/isolate/detect_nullsafety_helper.dart +++ b/tests/lib/isolate/detect_nullsafety_helper.dart @@ -25,7 +25,6 @@ void generateOutput(String sourcePath, String outPath, String type) { var args = []; args.add("--snapshot-kind=$type"); args.add("--snapshot=$outPath"); - args.add("--enable-experiment=non-nullable"); args.add(sourcePath); var result = Process.runSync(exec, args); print('snapshot $type stdout: ${result.stdout}'); @@ -43,7 +42,6 @@ void generateAppJIT(String sourcePath, String outPath) { void testNullSafetyMode(String filePath, String expected) { var exec = Platform.resolvedExecutable; var args = []; - args.add("--enable-experiment=non-nullable"); args.add(filePath); var result = Process.runSync(exec, args); print('test stdout: ${result.stdout}'); diff --git a/tests/lib/isolate/nnbd_spawn_autodetect_helper.dart b/tests/lib/isolate/nnbd_spawn_autodetect_helper.dart index d0eaeac515b..cfa4a3028c6 100644 --- a/tests/lib/isolate/nnbd_spawn_autodetect_helper.dart +++ b/tests/lib/isolate/nnbd_spawn_autodetect_helper.dart @@ -51,7 +51,6 @@ void generateOutput(String sourcePath, String outPath, String type) { var args = []; args.add("--snapshot-kind=$type"); args.add("--snapshot=$outPath"); - args.add("--enable-experiment=non-nullable"); args.add(sourcePath); var result = Process.runSync(exec, args); print('snapshot $type stdout: ${result.stdout}'); @@ -69,7 +68,6 @@ void generateAppJIT(String sourcePath, String outPath) { void testNullSafetyMode(String filePath, String expected) { var exec = Platform.resolvedExecutable; var args = []; - args.add("--enable-experiment=non-nullable"); args.add(filePath); var result = Process.runSync(exec, args); print('test stdout: ${result.stdout}'); diff --git a/tests/lib/isolate/nnbd_spawnuri_autodetect_helper.dart b/tests/lib/isolate/nnbd_spawnuri_autodetect_helper.dart index 4cca7e9e61d..18d58fb3c8b 100644 --- a/tests/lib/isolate/nnbd_spawnuri_autodetect_helper.dart +++ b/tests/lib/isolate/nnbd_spawnuri_autodetect_helper.dart @@ -27,7 +27,6 @@ void generateOutput(String sourcePath, String outPath, String type) { var args = []; args.add("--snapshot-kind=$type"); args.add("--snapshot=$outPath"); - args.add("--enable-experiment=non-nullable"); args.add(sourcePath); var result = Process.runSync(exec, args); } @@ -74,7 +73,6 @@ void testNullSafetyMode( '''); var exec = Platform.resolvedExecutable; var args = []; - args.add("--enable-experiment=non-nullable"); args.add(mainIsolate.path); var result = Process.runSync(exec, args); expect(result.stdout.contains('$expected'), true); diff --git a/tests/lib_2/isolate/issue_6610_test.dart b/tests/lib_2/isolate/issue_6610_test.dart deleted file mode 100644 index ca701681473..00000000000 --- a/tests/lib_2/isolate/issue_6610_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2018, 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. - -// VMOptions=--enable-experiment=no-non-nullable --enable-isolate-groups --experimental-enable-isolate-groups-jit -// VMOptions=--enable-experiment=no-non-nullable --no-enable-isolate-groups - -// Testing that Isolate.spawn copies the source code of the parent isolate, -// rather than rereading the parent's source URI. -// https://github.com/dart-lang/sdk/issues/6610 - -// Isolate structure: -// Root 1 -> Branch 1 -> Leaf 1 -// / -// main -// \ -// Root 2 -> Branch 2 -> Leaf 2 - -library spawn_tests; - -import "dart:io"; -import 'dart:isolate'; -import 'package:expect/expect.dart'; - -void main() { - HttpServer.bind("127.0.0.1", 0).then((server) { - var count = 0; - server.listen((HttpRequest request) { - ++count; - request.response.write(""" - // @dart = 2.9 - import 'dart:isolate'; - - void main(_, SendPort port) { - root(port); - } - - void root(SendPort port) { - port.send("Root ${count}"); - Isolate.spawn(branch, port); - } - - void branch(SendPort port) { - port.send("Branch ${count}"); - Isolate.spawn(leaf, port); - } - - void leaf(SendPort port) { - port.send("Leaf ${count}"); - } - """); - request.response.close(); - }); - - ReceivePort port = new ReceivePort(); - var messageSet = Set(); - port.listen((message) { - messageSet.add(message); - if (messageSet.length >= 6) { - server.close(); - port.close(); - Expect.setEquals([ - "Root 1", - "Root 2", - "Branch 1", - "Branch 2", - "Leaf 1", - "Leaf 2", - ], messageSet); - } - }); - - Isolate.spawnUri( - Uri.parse("http://127.0.0.1:${server.port}"), [], port.sendPort); - Isolate.spawnUri( - Uri.parse("http://127.0.0.1:${server.port}"), [], port.sendPort); - }); -} diff --git a/tests/standalone_2/io/named_pipe_script_test.dart b/tests/standalone_2/io/named_pipe_script_test.dart deleted file mode 100644 index 50e74b0dc4c..00000000000 --- a/tests/standalone_2/io/named_pipe_script_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 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. -// Testing file input stream, VM-only, standalone test. - -// VMOptions=--enable-experiment=no-non-nullable - -import "dart:convert"; -import "dart:io"; - -import "package:async_helper/async_helper.dart"; -import "package:expect/expect.dart"; - -main() async { - asyncStart(); - // Reading a script from a named pipe is only supported on Linux and MacOS. - if (!Platform.isLinux && !Platform.isMacOS) { - print("This test is only supported on Linux and MacOS."); - asyncEnd(); - return; - } - - final String script = 'main() { print("Hello, World!"); }'; - final String stdinPipePath = '/dev/fd/0'; - - // If there's no file system access to the pipe, then we can't do a meaningful - // test. - if (!await (new File(stdinPipePath).exists())) { - print("Couldn't find $stdinPipePath."); - asyncEnd(); - return; - } - - StringBuffer output = new StringBuffer(); - Process process = await Process.start( - Platform.executable, - [] - ..addAll(Platform.executableArguments) - ..add('--verbosity=warning') - ..add(stdinPipePath)); - bool stdinWriteFailed = false; - process.stdout.transform(utf8.decoder).listen(output.write); - process.stderr.transform(utf8.decoder).listen((data) { - if (!stdinWriteFailed) { - Expect.fail(data); - process.kill(); - } - }); - process.stdin.done.catchError((e) { - // If the write to stdin fails, then give up. We can't test the thing we - // wanted to test. - stdinWriteFailed = true; - process.kill(); - }); - process.stdin.writeln(script); - await process.stdin.flush(); - await process.stdin.close(); - - int status = await process.exitCode; - if (!stdinWriteFailed) { - Expect.equals(0, status); - Expect.equals("Hello, World!\n", output.toString()); - } - asyncEnd(); -} diff --git a/tools/bots/flutter/compile_flutter.sh b/tools/bots/flutter/compile_flutter.sh index 8f4f2d6cbb9..194beb2ba98 100755 --- a/tools/bots/flutter/compile_flutter.sh +++ b/tools/bots/flutter/compile_flutter.sh @@ -83,7 +83,6 @@ $checkout/tools/sdks/dart-sdk/bin/dart \ dart:core \ -Ddart.vm.product=false \ -Ddart.isVM=true \ - --enable-experiment=non-nullable \ --nnbd-agnostic \ --single-root-scheme=org-dartlang-sdk \ --single-root-base=$checkout/ \ @@ -95,7 +94,6 @@ $checkout/tools/sdks/dart-sdk/bin/dart \ $checkout/tools/sdks/dart-sdk/bin/dart \ --packages=$checkout/.packages \ $checkout/pkg/front_end/tool/_fasta/compile_platform.dart \ - --enable-experiment=non-nullable \ --nnbd-agnostic \ --target=flutter \ dart:core \ diff --git a/tools/bots/try_benchmarks.sh b/tools/bots/try_benchmarks.sh index ea827b41634..7d4d5c89806 100755 --- a/tools/bots/try_benchmarks.sh +++ b/tools/bots/try_benchmarks.sh @@ -171,27 +171,27 @@ main() { } EOF out/ReleaseIA32/dart --profile-period=10000 --packages=.packages hello.dart - out/ReleaseIA32/dart --sound-null-safety --enable-experiment=non-nullable --profile-period=10000 --packages=.packages hello.dart + out/ReleaseIA32/dart --sound-null-safety --profile-period=10000 --packages=.packages hello.dart out/ReleaseIA32/dart pkg/front_end/tool/perf.dart parse hello.dart out/ReleaseIA32/dart pkg/front_end/tool/perf.dart scan hello.dart out/ReleaseIA32/dart pkg/front_end/tool/fasta_perf.dart kernel_gen_e2e hello.dart out/ReleaseIA32/dart pkg/front_end/tool/fasta_perf.dart scan hello.dart out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot InitialRSS - out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable InitialRSS + out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety InitialRSS out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot KernelServiceCompileAll - out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable KernelServiceCompileAll + out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety KernelServiceCompileAll out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot UseDartApi - out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable UseDartApi + out/ReleaseIA32/run_vm_tests --dfe=out/ReleaseIA32/kernel-service.dart.snapshot --sound-null-safety UseDartApi out/ReleaseIA32/dart --profile-period=10000 --packages=.packages benchmarks/Example/dart2/Example.dart - out/ReleaseIA32/dart --sound-null-safety --enable-experiment=non-nullable --profile-period=10000 --packages=.packages benchmarks/Example/dart/Example.dart + out/ReleaseIA32/dart --sound-null-safety --profile-period=10000 --packages=.packages benchmarks/Example/dart/Example.dart out/ReleaseIA32/dart benchmarks/FfiBoringssl/dart2/FfiBoringssl.dart - out/ReleaseIA32/dart --sound-null-safety --enable-experiment=non-nullable benchmarks/FfiBoringssl/dart/FfiBoringssl.dart + out/ReleaseIA32/dart --sound-null-safety benchmarks/FfiBoringssl/dart/FfiBoringssl.dart out/ReleaseIA32/dart benchmarks/FfiCall/dart2/FfiCall.dart - out/ReleaseIA32/dart --sound-null-safety --enable-experiment=non-nullable benchmarks/FfiCall/dart/FfiCall.dart + out/ReleaseIA32/dart --sound-null-safety benchmarks/FfiCall/dart/FfiCall.dart out/ReleaseIA32/dart benchmarks/FfiMemory/dart2/FfiMemory.dart - out/ReleaseIA32/dart --sound-null-safety --enable-experiment=non-nullable benchmarks/FfiMemory/dart/FfiMemory.dart + out/ReleaseIA32/dart --sound-null-safety benchmarks/FfiMemory/dart/FfiMemory.dart out/ReleaseIA32/dart benchmarks/FfiStruct/dart2/FfiStruct.dart - out/ReleaseIA32/dart --sound-null-safety --enable-experiment=non-nullable benchmarks/FfiStruct/dart/FfiStruct.dart + out/ReleaseIA32/dart --sound-null-safety benchmarks/FfiStruct/dart/FfiStruct.dart cd .. rm -rf tmp elif [ "$command" = linux-x64-build ]; then @@ -318,30 +318,30 @@ main() { } EOF out/ReleaseX64/dart --profile-period=10000 --packages=.packages hello.dart - out/ReleaseX64/dart --sound-null-safety --enable-experiment=non-nullable --profile-period=10000 --packages=.packages hello.dart + out/ReleaseX64/dart --sound-null-safety --profile-period=10000 --packages=.packages hello.dart DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/precompiler2 --packages=.packages hello.dart blob.bin DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/dart_precompiled_runtime2 --profile-period=10000 blob.bin - DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/precompiler2 --sound-null-safety --enable-experiment=non-nullable --packages=.packages hello.dart blob.bin + DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/precompiler2 --sound-null-safety --packages=.packages hello.dart blob.bin DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/dart_precompiled_runtime2 --profile-period=10000 blob.bin out/ReleaseX64/dart --profile-period=10000 --packages=.packages --optimization-counter-threshold=-1 hello.dart out/ReleaseX64/dart-sdk/bin/dart2js --packages=.packages --out=out.js -m hello.dart third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js - out/ReleaseX64/dart-sdk/bin/dart2js --enable-experiment=non-nullable --sound-null-safety --packages=.packages --out=out.js -m hello.dart + out/ReleaseX64/dart-sdk/bin/dart2js --sound-null-safety --packages=.packages --out=out.js -m hello.dart third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js out/ReleaseX64/dart-sdk/bin/dart2js --packages=.packages --out=out.js -m hello.dart LD_LIBRARY_PATH=third_party/firefox_jsshell/linux/jsshell/ third_party/firefox_jsshell/linux/jsshell/js -f sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js -f out.js - out/ReleaseX64/dart-sdk/bin/dart2js --enable-experiment=non-nullable --sound-null-safety --packages=.packages --out=out.js -m hello.dart + out/ReleaseX64/dart-sdk/bin/dart2js --sound-null-safety --packages=.packages --out=out.js -m hello.dart LD_LIBRARY_PATH=third_party/firefox_jsshell/linux/jsshell/ third_party/firefox_jsshell/linux/jsshell/js -f sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js -f out.js out/ReleaseX64/dart-sdk/bin/dart2js --benchmarking-production --packages=.packages --out=out.js -m hello.dart third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js - out/ReleaseX64/dart-sdk/bin/dart2js --enable-experiment=non-nullable --sound-null-safety --benchmarking-production --packages=.packages --out=out.js -m hello.dart + out/ReleaseX64/dart-sdk/bin/dart2js --sound-null-safety --benchmarking-production --packages=.packages --out=out.js -m hello.dart third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js out/ReleaseX64/dart-sdk/bin/dart2js --benchmarking-x --packages=.packages --out=out.js -m hello.dart third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 hello.dart out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --mode=compile --compile-vm-options=--print-metrics --packages=.packages --out out.js hello.dart - out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --enable-experiment=non-nullable --sound-null-safety hello.dart - out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --enable-experiment=non-nullable --sound-null-safety --mode=compile --compile-vm-options=--print-metrics --packages=.packages --out out.js hello.dart + out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --sound-null-safety hello.dart + out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --sound-null-safety --mode=compile --compile-vm-options=--print-metrics --packages=.packages --out out.js hello.dart out/ReleaseX64/dart pkg/front_end/tool/perf.dart parse hello.dart out/ReleaseX64/dart pkg/front_end/tool/perf.dart scan hello.dart out/ReleaseX64/dart pkg/front_end/tool/fasta_perf.dart kernel_gen_e2e hello.dart @@ -352,13 +352,13 @@ EOF out/ReleaseX64/dart --background-compilation=false pkg/front_end/tool/incremental_perf.dart.appjit --target=vm --sdk-summary=out/ReleaseX64/vm_platform_strong.dill --sdk-library-specification=sdk/lib/libraries.json pkg/front_end/benchmarks/ikg/hello.dart pkg/front_end/benchmarks/ikg/hello.edits.json out/ReleaseX64/dart --packages=.packages pkg/kernel/test/binary_bench.dart --golem AstFromBinaryLazy out/ReleaseX64/vm_platform_strong.dill out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot InitialRSS - out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable InitialRSS + out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety InitialRSS out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot KernelServiceCompileAll - out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable KernelServiceCompileAll + out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety KernelServiceCompileAll out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot UseDartApi - out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety --enable-experiment=non-nullable UseDartApi + out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot --sound-null-safety UseDartApi out/ReleaseX64/dart --profile-period=10000 --packages=.packages benchmarks/Example/dart2/Example.dart - out/ReleaseX64/dart --sound-null-safety --enable-experiment=non-nullable --profile-period=10000 --packages=.packages benchmarks/Example/dart/Example.dart + out/ReleaseX64/dart --sound-null-safety --profile-period=10000 --packages=.packages benchmarks/Example/dart/Example.dart out/ReleaseX64/dart --profile-period=10000 --packages=.packages benchmarks/IsolateSpawn/dart2/IsolateSpawn.dart cd .. rm -rf tmp diff --git a/utils/compiler/BUILD.gn b/utils/compiler/BUILD.gn index f8b41bd8e27..e724494d920 100644 --- a/utils/compiler/BUILD.gn +++ b/utils/compiler/BUILD.gn @@ -87,7 +87,6 @@ compile_platform("compile_dart2js_platform") { "--target=dart2js", "--no-defines", "dart:core", - "--enable-experiment=non-nullable", ] } compile_platform("compile_dart2js_nnbd_strong_platform") { @@ -104,7 +103,6 @@ compile_platform("compile_dart2js_nnbd_strong_platform") { "--target=dart2js", "--no-defines", "dart:core", - "--enable-experiment=non-nullable", "--nnbd-strong", ] } @@ -122,7 +120,6 @@ compile_platform("compile_dart2js_server_platform") { "--target=dart2js_server", "--no-defines", "dart:core", - "--enable-experiment=non-nullable", ] } compile_platform("compile_dart2js_server_nnbd_strong_platform") { @@ -139,7 +136,6 @@ compile_platform("compile_dart2js_server_nnbd_strong_platform") { "--target=dart2js_server", "--no-defines", "dart:core", - "--enable-experiment=non-nullable", "--nnbd-strong", ] } diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn index 254af294b8e..9b9f07ce491 100644 --- a/utils/dartdevc/BUILD.gn +++ b/utils/dartdevc/BUILD.gn @@ -223,8 +223,6 @@ template("dartdevc_kernel_compile") { args += invoker.args } - args += [ "--enable-experiment=non-nullable" ] - if (invoker.sound_null_safety) { args += [ "--sound-null-safety" ] } @@ -287,7 +285,6 @@ template("compile_dartdevc_platform") { args = [ "--target=dartdevc", "dart:core", - "--enable-experiment=non-nullable", ] if (invoker.sound_null_safety) { @@ -379,7 +376,6 @@ template("dartdevc_sdk_js") { "-o", rebase_path("$js_gen_dir/legacy/dart_sdk.js"), rebase_path("$platform_input"), - "--enable-experiment=non-nullable", ] if (invoker.sound_null_safety) {