This was inspired by the old GRECLIPSE-1523.
Consider the following:
package a
class TestF {
public PrintStream test() {
return System.out
}
}
Highlight "System.out", press Ctrl+1 and choose "Assign statement to new local variable". This is the result:
return def temp = System.out
which produces a compilation error.
Probably, in this case that quickfix should not be available (just like in JDT), because a more proper quickfix is "Extract to local variable" (which, by the way, produces the correct result).