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 // Tests that malformed types are handled as dynamic, and that types with the | 5 // Tests that malformed types are handled as dynamic, and that types with the |
6 // wrong number of type arguments are handled as raw types. | 6 // wrong number of type arguments are handled as raw types. |
7 | 7 |
8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
9 import 'package:expect/expect.dart' as prefix; // Define 'prefix'. | 9 import 'package:expect/expect.dart' as prefix; // Define 'prefix'. |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 throw 'foo'; | 156 throw 'foo'; |
157 } on prefix.Unresolved<int> catch (e) { | 157 } on prefix.Unresolved<int> catch (e) { |
158 Expect.fail("This code shouldn't be executed"); | 158 Expect.fail("This code shouldn't be executed"); |
159 } | 159 } |
160 Expect.fail("This code shouldn't be executed"); | 160 Expect.fail("This code shouldn't be executed"); |
161 } on TypeError catch (e) { | 161 } on TypeError catch (e) { |
162 } | 162 } |
163 try { | 163 try { |
164 throw 'foo'; | 164 throw 'foo'; |
165 } | 165 } |
166 on undeclared_prefix.Unresolved<int> /// 06: runtime error | 166 on undeclared_prefix.Unresolved<int> // /// 06: runtime error |
167 catch (e) { | 167 catch (e) { |
168 } | 168 } |
169 } | 169 } |
OLD | NEW |