Project: JDT
Bug 337181 [inline] returned value is not cast
Reported: 2011-02-15 00:59:09 | Status: resolved fixed

HEAD -Inline foo() - Expected: long much = (long) (1+1) * Integer.MAX_VALUE; - Actual: long much = (1+1) * Integer.MAX_VALUE; ------------------------------------------------------------------ package p; class A { void x() { long much = foo() * Integer.MAX_VALUE; } private long foo() { return 1 + 1; } } ------------------------------------------------------------------ See also InlineTempTests#test36, InlineConstantTests#test32.

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_in/TestReturnValue1.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_in/TestReturnValue2.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_in/TestReturnValue3.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_in/TestReturnValue4.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_in/TestReturnValue5.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_out/TestReturnValue1.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_out/TestReturnValue2.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_out/TestReturnValue3.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_out/TestReturnValue4.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/cast_out/TestReturnValue5.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/generic_in/TestParameterizedType4.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/generic_in/TestParameterizedType5.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/generic_in/TestParameterizedType6.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/generic_out/TestParameterizedType4.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/generic_out/TestParameterizedType5.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/generic_out/TestParameterizedType6.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InlineMethodTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/CallInliner.java