blob: cfd02c8932b4bbe949d0b45e6de544efc2f65a46 [file] [log] [blame]
// 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.
// @dart=2.9
/*@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=() ->* Null */ e = /*@ returnType=Null */ () => null;
var /*@ type=() ->* Null */ f = /*@ returnType=Null */ () =>
throw 'foo';
var /*@ type=() ->* int* */ g = /*@ returnType=int* */ () {
return 0;
};
var /*@ type=() ->* Null */ h = /*@ returnType=Null */ () {
return null;
};
var /*@ type=() ->* Null */ i = /*@ returnType=Null */ () {
return (throw 'foo');
};
}
main() {}