public class Client {
public void meth() {
Object sp1 = new Object() {
private int myVar = 0;
private int myProp = 0;
public int getProp() {
return myProp;
}
public void setProp(int prop) {
myProp = prop;
}
public void copy(Object sp) {
this.myVar = sp.myVar;
this.myProp = sp.getProp();
}
};
}
}
The issue is that usages of non-default constructor are replaced with initializations generated in anonymous body (
IDEADEV-17886). In the case like above generated initializations are also incorrect.