| 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 import "package:expect/expect.dart"; |
| 6 |
| 5 var myString; | 7 var myString; |
| 6 | 8 |
| 7 String ifBailout(test) { | 9 String ifBailout(test) { |
| 8 if (test) { | 10 if (test) { |
| 9 // Share the same variable for the type inference. | 11 // Share the same variable for the type inference. |
| 10 var o = myString; | 12 var o = myString; |
| 11 // Make sure the type inference wants an array. | 13 // Make sure the type inference wants an array. |
| 12 if (false) o[1] = 2; | 14 if (false) o[1] = 2; |
| 13 return '${o[0]} bailout'; | 15 return '${o[0]} bailout'; |
| 14 } | 16 } |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 Expect.equals('1234', doWhileBailout()); | 212 Expect.equals('1234', doWhileBailout()); |
| 211 | 213 |
| 212 Expect.equals(102334155, fibonacci(40)); | 214 Expect.equals(102334155, fibonacci(40)); |
| 213 | 215 |
| 214 phiBailout(); | 216 phiBailout(); |
| 215 ifPhiBailout1(1); | 217 ifPhiBailout1(1); |
| 216 ifPhiBailout1(2); | 218 ifPhiBailout1(2); |
| 217 ifPhiBailout2(1); | 219 ifPhiBailout2(1); |
| 218 ifPhiBailout2(2); | 220 ifPhiBailout2(2); |
| 219 } | 221 } |
| OLD | NEW |