| Index: pkg/front_end/testcases/inference/coerce_bottom_and_null_types.dart
|
| diff --git a/pkg/front_end/testcases/inference/coerce_bottom_and_null_types.dart b/pkg/front_end/testcases/inference/coerce_bottom_and_null_types.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7189891beece5aa116d8c90162960017c3b0294f
|
| --- /dev/null
|
| +++ b/pkg/front_end/testcases/inference/coerce_bottom_and_null_types.dart
|
| @@ -0,0 +1,27 @@
|
| +// Copyright (c) 2017, 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.
|
| +
|
| +/*@testedFeatures=inference*/
|
| +library test;
|
| +
|
| +f() {
|
| + var /*@type=int*/ a = 0;
|
| + var /*@type=dynamic*/ b = null;
|
| + var /*@type=dynamic*/ c = throw 'foo';
|
| + var /*@type=() -> int*/ d = /*@returnType=int*/ () => 0;
|
| + var /*@type=() -> dynamic*/ e = /*@returnType=dynamic*/ () => null;
|
| + var /*@type=() -> <BottomType>*/ f = /*@returnType=<BottomType>*/ () =>
|
| + throw 'foo';
|
| + var /*@type=() -> int*/ g = /*@returnType=int*/ () {
|
| + return 0;
|
| + };
|
| + var /*@type=() -> Null*/ h = /*@returnType=Null*/ () {
|
| + return null;
|
| + };
|
| + var /*@type=() -> <BottomType>*/ i = /*@returnType=<BottomType>*/ () {
|
| + return (throw 'foo');
|
| + };
|
| +}
|
| +
|
| +main() {}
|
|
|