Project: JDT
Bug 307758 [extract local] Unable to refactor expression without resolved type in variable initializer
Reported: 2010-03-31 12:32:14 | Status: verified fixed

Build Identifier: 20100218-1602 Selection is between "<" and ">". Alt+Shift+L (extract local) here reports "expression expected". One should not have to fix the error before refactoring in this manner. class A { public void m() { // foo is undeclared. int a = <foo + 5>; } } Reproducible: Always

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractConstant/canExtract/A_test37_in.java org.eclipse.jdt.ui.tests.refactoring/resources/ExtractConstant/canExtract/A_test37_out.java org.eclipse.jdt.ui.tests.refactoring/resources/ExtractTemp/canExtract/A_test104_in.java org.eclipse.jdt.ui.tests.refactoring/resources/ExtractTemp/canExtract/A_test104_out.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractConstantTests.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractTempTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/Checks.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java