| OLD | NEW |
| 1 // Expectation for test: | 1 // Expectation for test: |
| 2 // main() { | 2 // main() { |
| 3 // var x = int.parse('1233'); | 3 // var x = int.parse('1233'); |
| 4 // var y = int.parse('1234'); | 4 // var y = int.parse('1234'); |
| 5 // print(x is num); | 5 // print(x is num); |
| 6 // print(y is num); | 6 // print(y is num); |
| 7 // print(x | y); | 7 // print(x | y); |
| 8 // print(x is num); | 8 // print(x is num); |
| 9 // print(y is num); // will be compiled to `true` if we know the type of `y`. | 9 // print(y is num); // will be compiled to `true` if we know the type of `y`. |
| 10 // } | 10 // } |
| 11 | 11 |
| 12 function() { | 12 function() { |
| 13 var x = P.int_parse("1233", null, null), y = P.int_parse("1234", null, null); | 13 var x = P.int_parse("1233", null, null), y = P.int_parse("1234", null, null); |
| 14 P.print(typeof x === "number"); | 14 P.print(typeof x === "number"); |
| 15 P.print(typeof y === "number"); | 15 P.print(typeof y === "number"); |
| 16 P.print(J.$or$n(x, y)); | 16 if (typeof x !== "number" || typeof y !== "number") |
| 17 return J.$or$n(x, y); |
| 18 P.print((x | y) >>> 0); |
| 17 P.print(true); | 19 P.print(true); |
| 18 P.print(true); | 20 P.print(true); |
| 19 } | 21 } |
| OLD | NEW |