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 // Test that switching on type literals leads to a compile time error in | 5 // Test that switching on type literals leads to a compile time error in |
6 // dart2js since its implementation of [Type] implements 'operator =='. | 6 // dart2js since its implementation of [Type] implements 'operator =='. |
7 | 7 |
8 class C {} | 8 class C {} |
9 | 9 |
10 var v; | 10 var v; |
11 | 11 |
12 main() { | 12 main() { |
13 switch (v) { | 13 switch (v) { |
14 case C: break; // /// 01: compile-time error | 14 case C: break; // //# 01: compile-time error |
15 } | 15 } |
16 } | 16 } |
OLD | NEW |