OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of malformed_test; | 5 part of malformed_test; |
6 | 6 |
7 /// [o] is either `null` or `new List<String>()`. | 7 /// [o] is either `null` or `new List<String>()`. |
8 void testValue(var o) { | 8 void testValue(var o) { |
9 assert(o == null || o is List<String>); | 9 assert(o == null || o is List<String>); |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 } | 48 } |
49 }, "on List<Unresolved>/NullThrowError catch ($o)"); | 49 }, "on List<Unresolved>/NullThrowError catch ($o)"); |
50 | 50 |
51 test(o != null && inCheckedMode(), | 51 test(o != null && inCheckedMode(), |
52 () { Unresolved u = o; }, | 52 () { Unresolved u = o; }, |
53 "Unresolved u = $o;"); | 53 "Unresolved u = $o;"); |
54 test(false, | 54 test(false, |
55 () { List<Unresolved> u = o; }, | 55 () { List<Unresolved> u = o; }, |
56 "List<Unresolved> u = $o;"); | 56 "List<Unresolved> u = $o;"); |
57 } | 57 } |
OLD | NEW |