OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 // Test that engines will not infer that [a] is always of type int. | |
6 | |
7 var a = foo(); | |
8 | |
9 foo() { | |
10 () => 42; | |
11 if (true) throw 'Sorry'; | |
12 return 42; | |
13 } | |
14 | |
15 main() { | |
16 try { | |
17 a; | |
18 } catch (e) { | |
19 // Ignore. | |
20 } | |
21 if (a is num) throw 'Test failed'; | |
22 } | |
OLD | NEW |