| Index: testcases/input/null_aware.dart
|
| diff --git a/testcases/input/null_aware.dart b/testcases/input/null_aware.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bb1e3e0dd01346ec57ca7d3925e602b852ed08ac
|
| --- /dev/null
|
| +++ b/testcases/input/null_aware.dart
|
| @@ -0,0 +1,20 @@
|
| +// 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.
|
| +class Foo {
|
| + int field;
|
| + static int staticField;
|
| +}
|
| +
|
| +main() {
|
| + Foo foo = new Foo();
|
| + foo?.field = 5;
|
| + Foo?.staticField = 5;
|
| + foo.field ??= 5;
|
| + Foo.staticField ??= 5;
|
| + foo?.field ??= 5;
|
| + Foo?.staticField ??= 5;
|
| +
|
| + int intValue = foo.field ?? 6;
|
| + num numValue = foo.field ?? 4.5;
|
| +}
|
|
|