| OLD | NEW |
| 1 // Expectation for test: | 1 // Expectation for test: |
| 2 // // Constant folding | 2 // // Constant folding |
| 3 // main() { | 3 // main() { |
| 4 // print('A'.codeUnitAt(0)); | 4 // print('A'.codeUnitAt(0)); |
| 5 // } | 5 // } |
| 6 | 6 |
| 7 function() { | 7 function() { |
| 8 var line = "" + 65; | |
| 9 if (typeof dartPrint == "function") | 8 if (typeof dartPrint == "function") |
| 10 dartPrint(line); | 9 dartPrint("65"); |
| 11 else if (typeof console == "object" && typeof console.log != "undefined") | 10 else if (typeof console == "object" && typeof console.log != "undefined") |
| 12 console.log(line); | 11 console.log("65"); |
| 13 else if (!(typeof window == "object")) { | 12 else if (!(typeof window == "object")) { |
| 14 if (!(typeof print == "function")) | 13 if (!(typeof print == "function")) |
| 15 throw "Unable to print message: " + String(line); | 14 throw "Unable to print message: " + String("65"); |
| 16 print(line); | 15 print("65"); |
| 17 } | 16 } |
| 18 } | 17 } |
| OLD | NEW |