| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class SyntaxTest { | 5 class SyntaxTest { |
| 6 // "this" cannot be used as a field name. | 6 // "this" cannot be used as a field name. |
| 7 SyntaxTest this; /// 01: compile-time error | 7 SyntaxTest this; /// 01: compile-time error |
| 8 | 8 |
| 9 // Syntax error. | 9 // Syntax error. |
| 10 foo {} /// 02: compile-time error | 10 foo {} /// 02: compile-time error |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 typedef <T>(); /// 48: compile-time error | 175 typedef <T>(); /// 48: compile-time error |
| 176 | 176 |
| 177 class B | 177 class B |
| 178 extends void /// 49: compile-time error | 178 extends void /// 49: compile-time error |
| 179 {} | 179 {} |
| 180 | 180 |
| 181 main() { | 181 main() { |
| 182 try { | 182 try { |
| 183 new SyntaxTest(); | 183 new SyntaxTest(); |
| 184 new SyntaxTest().foo(); /// 02: continued |
| 185 SyntaxTest.foo(); /// 03: continued |
| 184 fisk(); /// 27: continued | 186 fisk(); /// 27: continued |
| 185 | 187 |
| 186 new Window(); | 188 new Window(); |
| 187 new Console(); | 189 new Console(); |
| 188 new NativeClass(); | 190 new NativeClass(); |
| 189 new BoolImplementation(); | 191 new BoolImplementation(); |
| 190 new _JSON(); | 192 new _JSON(); |
| 191 new ListFactory(); | 193 new ListFactory(); |
| 192 new ListFactory<Object>(); | 194 new ListFactory<Object>(); |
| 193 var x = null; | 195 var x = null; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 235 |
| 234 } catch (var ex) { | 236 } catch (var ex) { |
| 235 // Swallowing exceptions. Any error should be a compile-time error | 237 // Swallowing exceptions. Any error should be a compile-time error |
| 236 // which kills the current isolate. | 238 // which kills the current isolate. |
| 237 } | 239 } |
| 238 } | 240 } |
| 239 | 241 |
| 240 class Bad { | 242 class Bad { |
| 241 factory Bad<Bad(String type) { return null; } /// 63: compile-time error | 243 factory Bad<Bad(String type) { return null; } /// 63: compile-time error |
| 242 } | 244 } |
| OLD | NEW |