Open yuemingl opened 9 years ago
I can compile and run your example with both, IntelliJ and javac. Are you using Eclipse? Is this bug already fixed?
Another Workaround for this problem is, to simply add a cast. (Jeep j = (Car)(c1 + c2)). This works for some reason.
I tried this simple test case:
An exception is thrown out:
Exception in thread "main" java.lang.VerifyError: Operand stack underflow Exception Details: Location: symjava/test/TestValueOf.main([Ljava/lang/String;)V @25: invokestatic Reason: Attempt to pop empty stack. Current Frame: bci: @25 flags: { } locals: { '[Ljava/lang/String;', 'symjava/test/TestValueOf$Car', 'symjava/test/TestValueOf$Car', 'symjava/test/TestValueOf$Car' } stack: { } Bytecode: 0000000: bb00 1059 04b7 0012 4cbb 0010 5910 0ab7 0000010: 0012 4d2b 2cb6 0015 4eb8 0019 3a04 b200 0000020: 1f19 04b4 0025 b600 29b1