mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inline parameter: assignment to local variable between its declaration and the call causes the incompilable code (IDEA-52164)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
public class ExpData {
|
||||
public void use(Object p) {
|
||||
System.out.println(p);
|
||||
}
|
||||
|
||||
public void context() {
|
||||
ObjectType v1 = new ObjectType();
|
||||
v1 = v1.provide();
|
||||
inline1(v1);
|
||||
|
||||
int v2 = 1;
|
||||
v2 += System.identityHashCode(new Object());
|
||||
inline2(v2);
|
||||
}
|
||||
|
||||
public void inline1(ObjectType <caret>subj) {
|
||||
use(subj);
|
||||
}
|
||||
|
||||
public void inline2(int subj) {
|
||||
use(subj);
|
||||
}
|
||||
}
|
||||
|
||||
class ObjectType {
|
||||
private int value = 1;
|
||||
|
||||
public ObjectType provide() {
|
||||
return new ObjectType();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user