Remove (most) uses of the "non-nullable" experiment flag.

Since the flag is now enabled by default, there should be no mention of it.
There are still some uses in front_end/testcases that are not just removable
(it also uses `no-non-nullable`). There migth be more uses that are not
as easily found as grepping for `--enable-experiment

Removes two VM tests where fixing them meant they were just duplicating
the corresponding non *_2/ tests.
Fixes #44941

TEST= Large number of tests chaged.=(no-)?non-nullable`.

Change-Id: Ief755981ccde9a5482fcdf408c2929c74433a710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183688
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
This commit is contained in:
Lasse R.H. Nielsen 2021-02-12 17:16:54 +00:00 committed by commit-bot@chromium.org
parent 2d27b34b06
commit d352bc28b8
119 changed files with 23 additions and 314 deletions

View file

@ -33,7 +33,7 @@ runTests(List<String> args, [int shardIndex]) {
shards: 2,
directory: 'data',
skip: skip,
options: ['--enable-experiment=non-nullable', Flags.soundNullSafety]);
options: [Flags.soundNullSafety]);
}
runTests2(List<String> args, [int shardIndex]) {

View file

@ -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 =

View file

@ -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']);

View file

@ -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()
]);

View file

@ -788,7 +788,6 @@ class Run extends Step<ComponentResult, ComponentResult, FastaContext> {
try {
var args = <String>[];
if (experimentalFlags[ExperimentalFlag.nonNullable] == true) {
args.add("--enable-experiment=non-nullable");
if (!context.weak) {
args.add("--sound-null-safety");
}

View file

@ -1761,7 +1761,6 @@ class BarState extends State<FizzWidget> {
'--output-dill=${dillFile.path}',
'--packages=${package_config.path}',
'--target=dartdevc',
'--enable-experiment=non-nullable',
file.path,
];
@ -1915,7 +1914,6 @@ class BarState extends State<FizzWidget> {
'--output-dill=${dillFile.path}',
'--target=dartdevc',
'--packages=${package_config.path}',
'--enable-experiment=non-nullable',
];
final StreamController<List<int>> streamController =
@ -1996,7 +1994,6 @@ class BarState extends State<FizzWidget> {
'--target=dartdevc',
'--packages=${package_config.path}',
'--experimental-emit-debug-metadata',
'--enable-experiment=non-nullable',
];
final StreamController<List<int>> streamController =
@ -2243,7 +2240,6 @@ class BarState extends State<FizzWidget> {
'--output-dill=${dillFile.path}',
'--target=dartdevc',
'--packages=${package_config.path}',
'--enable-experiment=non-nullable',
];
final StreamController<List<int>> streamController =
@ -2362,7 +2358,6 @@ class BarState extends State<FizzWidget> {
'--output-dill=${dillFile.path}',
'--target=dartdevc',
'--packages=${package_config.path}',
'--enable-experiment=non-nullable'
];
final StreamController<List<int>> streamController =

View file

@ -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,

View file

@ -29,7 +29,6 @@ compileAndRunTest(String comment, String expectedOutput) async {
await runGenKernelWithoutStandardOptions('BUILD DILL FILE', [
"--platform",
platformDill,
'--enable-experiment=non-nullable',
'--output=$testDillPath',
testScriptPath,
]);

View file

@ -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}',

View file

@ -29,7 +29,6 @@ compileAndRunTest(String comment, String expectedOutput) async {
await runGenKernelWithoutStandardOptions('BUILD DILL FILE', [
"--platform",
platformDill,
'--enable-experiment=non-nullable',
'--output=$testDillPath',
testScriptPath,
]);

View file

@ -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) {

View file

@ -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[@]}" "$@"

View file

@ -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[@]}" "$@"

View file

@ -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;

View file

@ -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 {

View file

@ -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() {

View file

@ -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

View file

@ -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() {

View file

@ -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) {

View file

@ -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) {

View file

@ -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;

View file

@ -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';

View file

@ -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;

View file

@ -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';

View file

@ -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?) {

View file

@ -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) {

View file

@ -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;

View file

@ -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) {

View file

@ -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.

View file

@ -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() {}

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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() {

View file

@ -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.

View file

@ -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() {}

View file

@ -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.

View file

@ -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';

View file

@ -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."

View file

@ -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`.

View file

@ -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`.

View file

@ -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.

View file

@ -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.

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -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.

View file

@ -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() {}

View file

@ -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';

View file

@ -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.

View file

@ -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,

View file

@ -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

View file

@ -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);

View file

@ -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`.

View file

@ -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() {

View file

@ -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 {

View file

@ -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() {
}

View file

@ -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";

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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 {

View file

@ -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

View file

@ -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';

View file

@ -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';

View file

@ -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;

View file

@ -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';

View file

@ -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';

View file

@ -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;

View file

@ -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;

View file

@ -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();

View file

@ -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

View file

@ -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';

View file

@ -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 {

View file

@ -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;

View file

@ -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';

View file

@ -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

View file

@ -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;

View file

@ -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<int>? x) {
if (x == null) {

View file

@ -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) {

View file

@ -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));

View file

@ -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 {

View file

@ -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 {

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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;

View file

@ -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) {

View file

@ -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) {

View file

@ -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);

Some files were not shown because too many files have changed in this diff Show more