| Index: pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart
|
| diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..73befb1ab4929d626bedb33e391fa0254b008201
|
| --- /dev/null
|
| +++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart
|
| @@ -0,0 +1,26 @@
|
| +// 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;
|
| +
|
| +var /*@topType=dynamic*/ h = null;
|
| +void foo(int f(Object _)) {}
|
| +
|
| +main() {
|
| + var /*@type=(Object x) → Null*/ f = /*@returnType=Null*/ (Object x) {
|
| + return null;
|
| + };
|
| + String y = /*@promotedType=none*/ f(42);
|
| +
|
| + f = /*error:INVALID_CAST_FUNCTION_EXPR*/ /*@returnType=String*/ (/*@type=Object*/ x) =>
|
| + 'hello';
|
| +
|
| + foo(/*@returnType=Null*/ (/*@type=Object*/ x) {
|
| + return null;
|
| + });
|
| + foo(/*@returnType=Null*/ (/*@type=Object*/ x) {
|
| + throw "not implemented";
|
| + });
|
| +}
|
|
|