Chromium Code Reviews| 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 // Make sure we use JavaScript semantics when compiling compile-time constants. | |
| 6 | |
| 7 // In checked mode, this return will not fail. If the compiler thinks | |
| 8 // it will, then dead code will remove the throw in the main method. | |
| 9 int getInt() { | |
| 10 return -0.0; | |
| 11 } | |
| 12 | |
| 13 main() { | |
| 14 getInt(); | |
| 15 throw 'Should fail'; | |
| 16 } | |
| OLD | NEW |