Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-10
-
None
-
Windows, JDK 1.4.2_06
Description
// Problem 1 ------------------------------
x = 7
x = x << 2 // work
println x
x = 7
x <<= 2 // Not work
println x
// Problem 2 ------------------------------
x = 7
x = x >> 2 // work
println x
x = 7
x >>= 2 // not work
println x
// Problem 3 ------------------------------
x = -7
x = x >> 1 // work
x = x >>> 1 // Not work
x >>>= 1 // Not work
// Problem 4 ------------------------------
x = 7 & 1 // Not work
x = 7 | 1 // Not work
x = 7 ^ 1 // Not work
x = 7 // Not work
x &= 1 // Not work
x |= 1 // Not work
// Problem 5 ------------------------------
x = ~3
println x // Expected -4, but -3
// Problem 6 ------------------------------
x = 'A' & 1 // Error Stack Trace
x = (char)'A' & 1 // Error Stack Trace
x = 'A'.charAt(0) & 1 // Error Stack Trace