diff options
Diffstat (limited to 'java/typeMigration/testData/refactoring/migrateTypeSignature')
309 files changed, 5287 insertions, 0 deletions
diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Lvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Lvalue/after/Expr.items new file mode 100644 index 000000000000..7ce904f6afe4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Lvalue/after/Expr.items @@ -0,0 +1,33 @@ +Types: +PsiField:myForAccess : ClassParent +PsiLocalVariable:vf : ClassParent +PsiLocalVariable:vfcthis : ClassParent +PsiLocalVariable:vfnew : ClassParent +PsiLocalVariable:vfparen : ClassParent +PsiLocalVariable:vfthis : ClassParent +PsiLocalVariable:vm : ClassParent +PsiLocalVariable:vmcthis : ClassParent +PsiLocalVariable:vmnew : ClassParent +PsiLocalVariable:vmparen : ClassParent +PsiLocalVariable:vmthis : ClassParent +PsiMethod:forAccess : ClassParent +PsiMethodCallExpression:(this).forAccess() : ClassParent +PsiMethodCallExpression:Expr.this.forAccess() : ClassParent +PsiMethodCallExpression:forAccess() : ClassParent +PsiMethodCallExpression:forAccess() : ClassParent +PsiMethodCallExpression:forAccess() : ClassParent +PsiMethodCallExpression:new Expr().forAccess() : ClassParent +PsiMethodCallExpression:this.forAccess() : ClassParent +PsiReferenceExpression:(this).myForAccess : ClassParent +PsiReferenceExpression:Expr.this.myForAccess : ClassParent +PsiReferenceExpression:myForAccess : ClassParent +PsiReferenceExpression:myForAccess : ClassParent +PsiReferenceExpression:new Expr().myForAccess : ClassParent +PsiReferenceExpression:this.myForAccess : ClassParent + +Conversions: + +New expression type changes: +Fails: +forAccess()->ClassParent +forAccess()->ClassParent diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Lvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Lvalue/after/Expr.java new file mode 100644 index 000000000000..65fd52a3e86e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Lvalue/after/Expr.java @@ -0,0 +1,35 @@ +class ClassParent {} +class ClassChild extends ClassParent { + public void forAccess2() { + } + + public int myForAccess; +} +class ClassGrandChild extends ClassChild {} + +class Expr { + public ClassParent myForAccess; + public ClassParent forAccess() { + return myForAccess; + } + + public void methMemAcc() { + ClassParent vf = myForAccess; + ClassParent vm = forAccess(); + + ClassParent vfthis = this.myForAccess; + ClassParent vmthis = this.forAccess(); + + ClassParent vfcthis = Expr.this.myForAccess; + ClassParent vmcthis = Expr.this.forAccess(); + + ClassParent vfparen = (this).myForAccess; + ClassParent vmparen = (this).forAccess(); + + ClassParent vfnew = new Expr().myForAccess; + ClassParent vmnew = new Expr().forAccess(); + + int v = forAccess().myForAccess; + forAccess().forAccess2(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Lvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Lvalue/before/Expr.java new file mode 100644 index 000000000000..1c13032fa121 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Lvalue/before/Expr.java @@ -0,0 +1,35 @@ +class ClassParent {} +class ClassChild extends ClassParent { + public void forAccess2() { + } + + public int myForAccess; +} +class ClassGrandChild extends ClassChild {} + +class Expr { + public ClassChild myForAccess; + public ClassChild forAccess() { + return myForAccess; + } + + public void methMemAcc() { + ClassChild vf = myForAccess; + ClassChild vm = forAccess(); + + ClassChild vfthis = this.myForAccess; + ClassChild vmthis = this.forAccess(); + + ClassChild vfcthis = Expr.this.myForAccess; + ClassChild vmcthis = Expr.this.forAccess(); + + ClassChild vfparen = (this).myForAccess; + ClassChild vmparen = (this).forAccess(); + + ClassChild vfnew = new Expr().myForAccess; + ClassChild vmnew = new Expr().forAccess(); + + int v = forAccess().myForAccess; + forAccess().forAccess2(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Rvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Rvalue/after/Expr.items new file mode 100644 index 000000000000..d79df57fc220 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Rvalue/after/Expr.items @@ -0,0 +1,37 @@ +Types: +PsiField:myField : ClassGrandChild +PsiField:myForAccess1 : ClassGrandChild +PsiField:myForAccess2 : ClassGrandChild +PsiField:myForAccess3 : ClassGrandChild +PsiField:myForAccess4 : ClassGrandChild +PsiField:myForAccess5 : ClassGrandChild +PsiMethod:forAccess1 : ClassGrandChild +PsiMethod:forAccess2 : ClassGrandChild +PsiMethod:forAccess3 : ClassGrandChild +PsiMethod:forAccess4 : ClassGrandChild +PsiMethod:forAccess5 : ClassGrandChild +PsiMethodCallExpression:(this).forAccess4() : ClassGrandChild +PsiMethodCallExpression:Expr.this.forAccess3() : ClassGrandChild +PsiMethodCallExpression:forAccess1() : ClassGrandChild +PsiMethodCallExpression:new Expr().forAccess5() : ClassGrandChild +PsiMethodCallExpression:this.forAccess2() : ClassGrandChild +PsiReferenceExpression:(this).myForAccess4 : ClassGrandChild +PsiReferenceExpression:Expr.this.myForAccess3 : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myForAccess1 : ClassGrandChild +PsiReferenceExpression:new Expr().myForAccess5 : ClassGrandChild +PsiReferenceExpression:this.myForAccess2 : ClassGrandChild + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Rvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Rvalue/after/Expr.java new file mode 100644 index 000000000000..11599a2cd3a6 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Rvalue/after/Expr.java @@ -0,0 +1,54 @@ +class ClassParent {} +class ClassChild extends ClassParent { + public void forAccess2() { + } + + public int myForAccess; +} +class ClassGrandChild extends ClassChild {} + +class Expr { + private ClassGrandChild myField; + + public ClassGrandChild myForAccess1; + public ClassGrandChild forAccess1() { + return null; + } + + public ClassGrandChild myForAccess2; + public ClassGrandChild forAccess2() { + return null; + } + + public ClassGrandChild myForAccess3; + public ClassGrandChild forAccess3() { + return null; + } + + public ClassGrandChild myForAccess4; + public ClassGrandChild forAccess4() { + return null; + } + + public ClassGrandChild myForAccess5; + public ClassGrandChild forAccess5() { + return null; + } + + public void methMemAcc() { + myField = myForAccess1; + myField = forAccess1(); + + myField = this.myForAccess2; + myField = this.forAccess2(); + + myField = Expr.this.myForAccess3; + myField = Expr.this.forAccess3(); + + myField = (this).myForAccess4; + myField = (this).forAccess4(); + + myField = new Expr().myForAccess5; + myField = new Expr().forAccess5(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Rvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Rvalue/before/Expr.java new file mode 100644 index 000000000000..64998cf198c8 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccess2Rvalue/before/Expr.java @@ -0,0 +1,54 @@ +class ClassParent {} +class ClassChild extends ClassParent { + public void forAccess2() { + } + + public int myForAccess; +} +class ClassGrandChild extends ClassChild {} + +class Expr { + private ClassChild myField; + + public ClassChild myForAccess1; + public ClassChild forAccess1() { + return null; + } + + public ClassChild myForAccess2; + public ClassChild forAccess2() { + return null; + } + + public ClassChild myForAccess3; + public ClassChild forAccess3() { + return null; + } + + public ClassChild myForAccess4; + public ClassChild forAccess4() { + return null; + } + + public ClassChild myForAccess5; + public ClassChild forAccess5() { + return null; + } + + public void methMemAcc() { + myField = myForAccess1; + myField = forAccess1(); + + myField = this.myForAccess2; + myField = this.forAccess2(); + + myField = Expr.this.myForAccess3; + myField = Expr.this.forAccess3(); + + myField = (this).myForAccess4; + myField = (this).forAccess4(); + + myField = new Expr().myForAccess5; + myField = new Expr().forAccess5(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Lvalue/after/Ession.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Lvalue/after/Ession.items new file mode 100644 index 000000000000..15e80380b536 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Lvalue/after/Ession.items @@ -0,0 +1,17 @@ +Types: +PsiField:myForSuperAccess : ClassParent +PsiLocalVariable:vfcsuper : ClassParent +PsiLocalVariable:vfsuper : ClassParent +PsiLocalVariable:vmcsuper : ClassParent +PsiLocalVariable:vmsuper : ClassParent +PsiMethod:forSuperAccess : ClassParent +PsiMethodCallExpression:Expr.super.forSuperAccess() : ClassParent +PsiMethodCallExpression:super.forSuperAccess() : ClassParent +PsiReferenceExpression:Expr.super.myForSuperAccess : ClassParent +PsiReferenceExpression:myForSuperAccess : ClassParent +PsiReferenceExpression:super.myForSuperAccess : ClassParent + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Lvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Lvalue/after/Expr.java new file mode 100644 index 000000000000..3a9531d8f9d8 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Lvalue/after/Expr.java @@ -0,0 +1,20 @@ +class ClassParent {} +class ClassChild extends ClassParent {} +class ClassGrandChild extends ClassChild {} + +class Ession { + public ClassParent myForSuperAccess; + public ClassParent forSuperAccess() { + return myForSuperAccess; + } +} + +class Expr extends Ession { + public void methMemAcc() { + ClassParent vfsuper = super.myForSuperAccess; + ClassParent vmsuper = super.forSuperAccess(); + + ClassParent vfcsuper = Expr.super.myForSuperAccess; + ClassParent vmcsuper = Expr.super.forSuperAccess(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Lvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Lvalue/before/Expr.java new file mode 100644 index 000000000000..898b41a6ab6f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Lvalue/before/Expr.java @@ -0,0 +1,20 @@ +class ClassParent {} +class ClassChild extends ClassParent {} +class ClassGrandChild extends ClassChild {} + +class Ession { + public ClassChild myForSuperAccess; + public ClassChild forSuperAccess() { + return myForSuperAccess; + } +} + +class Expr extends Ession { + public void methMemAcc() { + ClassChild vfsuper = super.myForSuperAccess; + ClassChild vmsuper = super.forSuperAccess(); + + ClassChild vfcsuper = Expr.super.myForSuperAccess; + ClassChild vmcsuper = Expr.super.forSuperAccess(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Rvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Rvalue/after/Expr.items new file mode 100644 index 000000000000..95bf149e7b68 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Rvalue/after/Expr.items @@ -0,0 +1,19 @@ +Types: +PsiField:myField : ClassGrandChild +PsiField:myForSuperAccess1 : ClassGrandChild +PsiField:myForSuperAccess2 : ClassGrandChild +PsiMethod:forSuperAccess1 : ClassGrandChild +PsiMethod:forSuperAccess2 : ClassGrandChild +PsiMethodCallExpression:Expr.super.forSuperAccess2() : ClassGrandChild +PsiMethodCallExpression:super.forSuperAccess1() : ClassGrandChild +PsiReferenceExpression:Expr.super.myForSuperAccess2 : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:myField : ClassGrandChild +PsiReferenceExpression:super.myForSuperAccess1 : ClassGrandChild + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Rvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Rvalue/after/Expr.java new file mode 100644 index 000000000000..9ffe2e3a7332 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Rvalue/after/Expr.java @@ -0,0 +1,26 @@ +class ClassParent {} +class ClassChild extends ClassParent {} +class ClassGrandChild extends ClassChild {} + +class Ession { + public ClassGrandChild myForSuperAccess1; + public ClassGrandChild forSuperAccess1() { + return null; + } + + public ClassGrandChild myForSuperAccess2; + public ClassGrandChild forSuperAccess2() { + return null; + } +} + +class Expr extends Ession { + private ClassGrandChild myField; + public void methMemAcc() { + myField = super.myForSuperAccess1; + myField = super.forSuperAccess1(); + + myField = Expr.super.myForSuperAccess2; + myField = Expr.super.forSuperAccess2(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Rvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Rvalue/before/Expr.java new file mode 100644 index 000000000000..0a244c6448bd --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprAccessParent2Rvalue/before/Expr.java @@ -0,0 +1,26 @@ +class ClassParent {} +class ClassChild extends ClassParent {} +class ClassGrandChild extends ClassChild {} + +class Ession { + public ClassChild myForSuperAccess1; + public ClassChild forSuperAccess1() { + return null; + } + + public ClassChild myForSuperAccess2; + public ClassChild forSuperAccess2() { + return null; + } +} + +class Expr extends Ession { + private ClassChild myField; + public void methMemAcc() { + myField = super.myForSuperAccess1; + myField = super.forSuperAccess1(); + + myField = Expr.super.myForSuperAccess2; + myField = Expr.super.forSuperAccess2(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessNegative/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessNegative/after/Expr.items new file mode 100644 index 000000000000..0f10ca83564b --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessNegative/after/Expr.items @@ -0,0 +1,9 @@ +Types: +PsiParameter:p : double +PsiReferenceExpression:p : double + +Conversions: + +New expression type changes: +Fails: +p->double diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessNegative/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessNegative/after/Expr.java new file mode 100644 index 000000000000..9258f512d2b1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessNegative/after/Expr.java @@ -0,0 +1,6 @@ +class Expr { + public void meth(double p) { + String[] sa = new String[]{"0", "1"}; + String s = sa[p]; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessNegative/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessNegative/before/Expr.java new file mode 100644 index 000000000000..57fde1c6b34c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessNegative/before/Expr.java @@ -0,0 +1,6 @@ +class Expr { + public void meth(int p) { + String[] sa = new String[]{"0", "1"}; + String s = sa[p]; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessPositive/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessPositive/after/Expr.items new file mode 100644 index 000000000000..afc565fc6df7 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessPositive/after/Expr.items @@ -0,0 +1,8 @@ +Types: +PsiParameter:p : char +PsiReferenceExpression:p : char + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessPositive/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessPositive/after/Expr.java new file mode 100644 index 000000000000..7971b5e9e770 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessPositive/after/Expr.java @@ -0,0 +1,6 @@ +class Expr { + public void meth(char p) { + String[] sa = new String[]{"0", "1"}; + String s = sa[p]; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessPositive/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessPositive/before/Expr.java new file mode 100644 index 000000000000..57fde1c6b34c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprArrayAccessPositive/before/Expr.java @@ -0,0 +1,6 @@ +class Expr { + public void meth(int p) { + String[] sa = new String[]{"0", "1"}; + String s = sa[p]; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanBoolean/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanBoolean/after/Expr.items new file mode 100644 index 000000000000..4e6bf57cbb3e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanBoolean/after/Expr.items @@ -0,0 +1,30 @@ +Types: +PsiLocalVariable:vba : int +PsiLocalVariable:vbb : int +PsiLocalVariable:vbc : int +PsiParameter:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int +PsiReferenceExpression:pb : int + +Conversions: + +New expression type changes: +Fails: +pb->int +pb->int +pb->int +pb->int +pb->int +pb->int +pb->int diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanBoolean/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanBoolean/after/Expr.java new file mode 100644 index 000000000000..d0dd0e83a559 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanBoolean/after/Expr.java @@ -0,0 +1,16 @@ +class Expr { + public void meth(int pb) { + int vba = pb & pb; + int vbb = pb ^ pb; + int vbc = pb | pb; + boolean vbd = pb && pb; + boolean vbe = pb || pb; + + boolean vn1 = false; + vn1 &= pb; + boolean vn2 = false; + vn2 ^= pb; + boolean vn3 = false; + vn3 |= pb; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanBoolean/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanBoolean/before/Expr.java new file mode 100644 index 000000000000..d0364a40ca25 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanBoolean/before/Expr.java @@ -0,0 +1,16 @@ +class Expr { + public void meth(boolean pb) { + boolean vba = pb & pb; + boolean vbb = pb ^ pb; + boolean vbc = pb | pb; + boolean vbd = pb && pb; + boolean vbe = pb || pb; + + boolean vn1 = false; + vn1 &= pb; + boolean vn2 = false; + vn2 ^= pb; + boolean vn3 = false; + vn3 |= pb; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanNumeric/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanNumeric/after/Expr.items new file mode 100644 index 000000000000..21ecfb0d65a5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanNumeric/after/Expr.items @@ -0,0 +1,19 @@ +Types: +PsiParameter:pi : java.lang.Object +PsiReferenceExpression:pi : java.lang.Object +PsiReferenceExpression:pi : java.lang.Object +PsiReferenceExpression:pi : java.lang.Object +PsiReferenceExpression:pi : java.lang.Object +PsiReferenceExpression:pi : java.lang.Object +PsiReferenceExpression:pi : java.lang.Object + +Conversions: + +New expression type changes: +Fails: +pi->java.lang.Object +pi->java.lang.Object +pi->java.lang.Object +pi->java.lang.Object +pi->java.lang.Object +pi->java.lang.Object diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanNumeric/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanNumeric/after/Expr.java new file mode 100644 index 000000000000..c54d809c3906 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanNumeric/after/Expr.java @@ -0,0 +1,10 @@ +class Expr { + public void meth(Object pi) { + boolean vb1 = pi > 0; + boolean vb2 = pi >= 0; + boolean vb3 = pi < 0; + boolean vb4 = pi <= 0; + boolean vb6 = pi == 0; + boolean vb7 = pi != 0; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanNumeric/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanNumeric/before/Expr.java new file mode 100644 index 000000000000..1b113b43a3e6 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanNumeric/before/Expr.java @@ -0,0 +1,10 @@ +class Expr { + public void meth(int pi) { + boolean vb1 = pi > 0; + boolean vb2 = pi >= 0; + boolean vb3 = pi < 0; + boolean vb4 = pi <= 0; + boolean vb6 = pi == 0; + boolean vb7 = pi != 0; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanReference/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanReference/after/Expr.items new file mode 100644 index 000000000000..815d62ca7530 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanReference/after/Expr.items @@ -0,0 +1,15 @@ +Types: +PsiParameter:ps : double +PsiReferenceExpression:ps : double +PsiReferenceExpression:ps : double +PsiReferenceExpression:ps : double +PsiReferenceExpression:ps : double + +Conversions: + +New expression type changes: +Fails: +ps->double +ps->double +ps->double +ps->double diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanReference/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanReference/after/Expr.java new file mode 100644 index 000000000000..bc4c04967759 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanReference/after/Expr.java @@ -0,0 +1,8 @@ +class Expr { + public void meth(double ps) { + boolean vb5 = ps instanceof CharSequence; + boolean vb8 = ps == "string"; + boolean vb9 = ps != "string"; + boolean vbf = (1 >= 0) && (ps instanceof CharSequence); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanReference/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanReference/before/Expr.java new file mode 100644 index 000000000000..6def87eb9709 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcBooleanReference/before/Expr.java @@ -0,0 +1,8 @@ +class Expr { + public void meth(String ps) { + boolean vb5 = ps instanceof CharSequence; + boolean vb8 = ps == "string"; + boolean vb9 = ps != "string"; + boolean vbf = (1 >= 0) && (ps instanceof CharSequence); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Boolean/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Boolean/after/Expr.items new file mode 100644 index 000000000000..aeddc71515d9 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Boolean/after/Expr.items @@ -0,0 +1,58 @@ +Types: +PsiLocalVariable:vb9 : boolean +PsiLocalVariable:vba : boolean +PsiLocalVariable:vbb : boolean +PsiParameter:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean +PsiReferenceExpression:p : boolean + +Conversions: + +New expression type changes: +Fails: +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean +p->boolean diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Boolean/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Boolean/after/Expr.java new file mode 100644 index 000000000000..c90c55120370 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Boolean/after/Expr.java @@ -0,0 +1,35 @@ +class Expr { + public void meth(boolean p) { + int vb1 = p * p; + int vb2 = p / p; + int vb3 = p % p; + int vb4 = p + p; + int vb5 = p - p; + boolean vb9 = p & p; + boolean vba = p ^ p; + boolean vbb = p | p; + + int vn1 = 0; + vn1 *= p; + int vn2 = 0; + vn2 /= p; + int vn3 = 0; + vn3 %= p; + int vn4 = 0; + vn4 += p; + int vn5 = 0; + vn5 -= p; + int vn6 = 0; + vn6 <<= p; + int vn7 = 0; + vn7 >>= p; + int vn8 = 0; + vn8 >>>= p; + int vn9 = 0; + vn9 &= p; + int vna = 0; + vna ^= p; + int vnb = 0; + vnb |= p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Boolean/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Boolean/before/Expr.java new file mode 100644 index 000000000000..057b284248a0 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Boolean/before/Expr.java @@ -0,0 +1,35 @@ +class Expr { + public void meth(int p) { + int vb1 = p * p; + int vb2 = p / p; + int vb3 = p % p; + int vb4 = p + p; + int vb5 = p - p; + int vb9 = p & p; + int vba = p ^ p; + int vbb = p | p; + + int vn1 = 0; + vn1 *= p; + int vn2 = 0; + vn2 /= p; + int vn3 = 0; + vn3 %= p; + int vn4 = 0; + vn4 += p; + int vn5 = 0; + vn5 -= p; + int vn6 = 0; + vn6 <<= p; + int vn7 = 0; + vn7 >>= p; + int vn8 = 0; + vn8 >>>= p; + int vn9 = 0; + vn9 &= p; + int vna = 0; + vna ^= p; + int vnb = 0; + vnb |= p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Floating/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Floating/after/Expr.items new file mode 100644 index 000000000000..0fdb9d1291e9 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Floating/after/Expr.items @@ -0,0 +1,78 @@ +Types: +PsiLocalVariable:vb1 : float +PsiLocalVariable:vb2 : float +PsiLocalVariable:vb3 : float +PsiLocalVariable:vb4 : float +PsiLocalVariable:vb5 : float +PsiLocalVariable:vn1 : float +PsiLocalVariable:vn2 : float +PsiLocalVariable:vn3 : float +PsiLocalVariable:vn4 : float +PsiLocalVariable:vn5 : float +PsiLocalVariable:vu1 : float +PsiLocalVariable:vu2 : float +PsiLocalVariable:vu3 : float +PsiLocalVariable:vu4 : float +PsiLocalVariable:vu5 : float +PsiLocalVariable:vu6 : float +PsiParameter:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:vn1 : float +PsiReferenceExpression:vn2 : float +PsiReferenceExpression:vn3 : float +PsiReferenceExpression:vn4 : float +PsiReferenceExpression:vn5 : float + +Conversions: +0 -> $ +0 -> $ +0 -> $ +0 -> $ +0 -> $ + +New expression type changes: +Fails: +p->float +p->float +p->float +p->float +p->float +p->float +p->float +p->float +p->float +p->float +p->float +p->float diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Floating/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Floating/after/Expr.java new file mode 100644 index 000000000000..8e16d5b5d974 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Floating/after/Expr.java @@ -0,0 +1,42 @@ +class Expr { + public void meth(float p) { + float vu1 = p++; + float vu2 = p--; + float vu3 = ++p; + float vu4 = --p; + float vu5 = -p; + float vu6 = +p; + + float vb1 = p * p; + float vb2 = p / p; + float vb3 = p % p; + float vb4 = p + p; + float vb5 = p - p; + int vb9 = p & p; + int vba = p ^ p; + int vbb = p | p; + + float vn1 = 0; + vn1 *= p; + float vn2 = 0; + vn2 /= p; + float vn3 = 0; + vn3 %= p; + float vn4 = 0; + vn4 += p; + float vn5 = 0; + vn5 -= p; + int vn6 = 0; + vn6 <<= p; + int vn7 = 0; + vn7 >>= p; + int vn8 = 0; + vn8 >>>= p; + int vn9 = 0; + vn9 &= p; + int vna = 0; + vna ^= p; + int vnb = 0; + vnb |= p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Floating/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Floating/before/Expr.java new file mode 100644 index 000000000000..4088b28a0060 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Floating/before/Expr.java @@ -0,0 +1,42 @@ +class Expr { + public void meth(int p) { + int vu1 = p++; + int vu2 = p--; + int vu3 = ++p; + int vu4 = --p; + int vu5 = -p; + int vu6 = +p; + + int vb1 = p * p; + int vb2 = p / p; + int vb3 = p % p; + int vb4 = p + p; + int vb5 = p - p; + int vb9 = p & p; + int vba = p ^ p; + int vbb = p | p; + + int vn1 = 0; + vn1 *= p; + int vn2 = 0; + vn2 /= p; + int vn3 = 0; + vn3 %= p; + int vn4 = 0; + vn4 += p; + int vn5 = 0; + vn5 -= p; + int vn6 = 0; + vn6 <<= p; + int vn7 = 0; + vn7 >>= p; + int vn8 = 0; + vn8 >>>= p; + int vn9 = 0; + vn9 &= p; + int vna = 0; + vna ^= p; + int vnb = 0; + vnb |= p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Int/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Int/after/Expr.items new file mode 100644 index 000000000000..36e79ff677b4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Int/after/Expr.items @@ -0,0 +1,98 @@ +Types: +PsiLocalVariable:vb1 : long +PsiLocalVariable:vb2 : long +PsiLocalVariable:vb3 : long +PsiLocalVariable:vb4 : long +PsiLocalVariable:vb5 : long +PsiLocalVariable:vb6 : long +PsiLocalVariable:vb7 : long +PsiLocalVariable:vb8 : long +PsiLocalVariable:vb9 : long +PsiLocalVariable:vba : long +PsiLocalVariable:vbb : long +PsiLocalVariable:vn1 : long +PsiLocalVariable:vn2 : long +PsiLocalVariable:vn3 : long +PsiLocalVariable:vn4 : long +PsiLocalVariable:vn5 : long +PsiLocalVariable:vn6 : long +PsiLocalVariable:vn7 : long +PsiLocalVariable:vn8 : long +PsiLocalVariable:vn9 : long +PsiLocalVariable:vna : long +PsiLocalVariable:vnb : long +PsiLocalVariable:vu1 : long +PsiLocalVariable:vu2 : long +PsiLocalVariable:vu3 : long +PsiLocalVariable:vu4 : long +PsiLocalVariable:vu5 : long +PsiLocalVariable:vu6 : long +PsiLocalVariable:vu7 : long +PsiParameter:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:vn1 : long +PsiReferenceExpression:vn2 : long +PsiReferenceExpression:vn3 : long +PsiReferenceExpression:vn4 : long +PsiReferenceExpression:vn5 : long +PsiReferenceExpression:vn6 : long +PsiReferenceExpression:vn7 : long +PsiReferenceExpression:vn8 : long +PsiReferenceExpression:vn9 : long +PsiReferenceExpression:vna : long +PsiReferenceExpression:vnb : long + +Conversions: +0 -> $ +0 -> $ +0 -> $ +0 -> $ +0 -> $ +0 -> $ +0 -> $ +0 -> $ +0 -> $ +0 -> $ +0 -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Int/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Int/after/Expr.java new file mode 100644 index 000000000000..323dad23d5d3 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Int/after/Expr.java @@ -0,0 +1,46 @@ +class Expr { + public void meth(long p) { + long vu1 = p++; + long vu2 = p--; + long vu3 = ++p; + long vu4 = --p; + long vu5 = -p; + long vu6 = +p; + long vu7 = ~p; + + long vb1 = p * p; + long vb2 = p / p; + long vb3 = p % p; + long vb4 = p + p; + long vb5 = p - p; + long vb6 = p << p; + long vb7 = p >> p; + long vb8 = p >>> p; + long vb9 = p & p; + long vba = p ^ p; + long vbb = p | p; + + long vn1 = 0; + vn1 *= p; + long vn2 = 0; + vn2 /= p; + long vn3 = 0; + vn3 %= p; + long vn4 = 0; + vn4 += p; + long vn5 = 0; + vn5 -= p; + long vn6 = 0; + vn6 <<= p; + long vn7 = 0; + vn7 >>= p; + long vn8 = 0; + vn8 >>>= p; + long vn9 = 0; + vn9 &= p; + long vna = 0; + vna ^= p; + long vnb = 0; + vnb |= p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Int/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Int/before/Expr.java new file mode 100644 index 000000000000..716f4b7e60e1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2Int/before/Expr.java @@ -0,0 +1,46 @@ +class Expr { + public void meth(int p) { + int vu1 = p++; + int vu2 = p--; + int vu3 = ++p; + int vu4 = --p; + int vu5 = -p; + int vu6 = +p; + int vu7 = ~p; + + int vb1 = p * p; + int vb2 = p / p; + int vb3 = p % p; + int vb4 = p + p; + int vb5 = p - p; + int vb6 = p << p; + int vb7 = p >> p; + int vb8 = p >>> p; + int vb9 = p & p; + int vba = p ^ p; + int vbb = p | p; + + int vn1 = 0; + vn1 *= p; + int vn2 = 0; + vn2 /= p; + int vn3 = 0; + vn3 %= p; + int vn4 = 0; + vn4 += p; + int vn5 = 0; + vn5 -= p; + int vn6 = 0; + vn6 <<= p; + int vn7 = 0; + vn7 >>= p; + int vn8 = 0; + vn8 >>>= p; + int vn9 = 0; + vn9 &= p; + int vna = 0; + vna ^= p; + int vnb = 0; + vnb |= p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2String/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2String/after/Expr.items new file mode 100644 index 000000000000..406008949bd1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2String/after/Expr.items @@ -0,0 +1,62 @@ +Types: +PsiLocalVariable:vb4 : java.lang.String +PsiLocalVariable:vn4 : java.lang.String +PsiParameter:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:p : java.lang.String +PsiReferenceExpression:vn4 : java.lang.String + +Conversions: + +New expression type changes: +Fails: +0->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String +p->java.lang.String diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2String/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2String/after/Expr.java new file mode 100644 index 000000000000..62fd2ff0b0ff --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2String/after/Expr.java @@ -0,0 +1,35 @@ +class Expr { + public void meth(String p) { + int vb1 = p * p; + int vb2 = p / p; + int vb3 = p % p; + String vb4 = p + p; + int vb5 = p - p; + int vb9 = p & p; + int vba = p ^ p; + int vbb = p | p; + + int vn1 = 0; + vn1 *= p; + int vn2 = 0; + vn2 /= p; + int vn3 = 0; + vn3 %= p; + String vn4 = 0; + vn4 += p; + int vn5 = 0; + vn5 -= p; + int vn6 = 0; + vn6 <<= p; + int vn7 = 0; + vn7 >>= p; + int vn8 = 0; + vn8 >>>= p; + int vn9 = 0; + vn9 &= p; + int vna = 0; + vna ^= p; + int vnb = 0; + vnb |= p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2String/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2String/before/Expr.java new file mode 100644 index 000000000000..057b284248a0 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCalcNumeric2String/before/Expr.java @@ -0,0 +1,35 @@ +class Expr { + public void meth(int p) { + int vb1 = p * p; + int vb2 = p / p; + int vb3 = p % p; + int vb4 = p + p; + int vb5 = p - p; + int vb9 = p & p; + int vba = p ^ p; + int vbb = p | p; + + int vn1 = 0; + vn1 *= p; + int vn2 = 0; + vn2 /= p; + int vn3 = 0; + vn3 %= p; + int vn4 = 0; + vn4 += p; + int vn5 = 0; + vn5 -= p; + int vn6 = 0; + vn6 <<= p; + int vn7 = 0; + vn7 >>= p; + int vn8 = 0; + vn8 >>>= p; + int vn9 = 0; + vn9 &= p; + int vna = 0; + vna ^= p; + int vnb = 0; + vnb |= p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvalueNeg/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvalueNeg/after/Expr.items new file mode 100644 index 000000000000..01f325b2852d --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvalueNeg/after/Expr.items @@ -0,0 +1,9 @@ +Types: +PsiParameter:p : java.lang.String +PsiReferenceExpression:p : java.lang.String + +Conversions: + +New expression type changes: +Fails: +(short) p->java.lang.String diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvalueNeg/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvalueNeg/after/Expr.java new file mode 100644 index 000000000000..5a7343152288 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvalueNeg/after/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public void meth(String p) { + short v = (short) p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvalueNeg/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvalueNeg/before/Expr.java new file mode 100644 index 000000000000..e3519b4bb4bf --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvalueNeg/before/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public void meth(byte p) { + short v = (short) p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvaluePos/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvaluePos/after/Expr.items new file mode 100644 index 000000000000..f69d09024863 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvaluePos/after/Expr.items @@ -0,0 +1,8 @@ +Types: +PsiParameter:p : int +PsiReferenceExpression:p : int + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvaluePos/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvaluePos/after/Expr.java new file mode 100644 index 000000000000..64aecc896b80 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvaluePos/after/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public void meth(int p) { + short v = (short) p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvaluePos/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvaluePos/before/Expr.java new file mode 100644 index 000000000000..e3519b4bb4bf --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprCast2LvaluePos/before/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public void meth(byte p) { + short v = (short) p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2Reference/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2Reference/after/Expr.items new file mode 100644 index 000000000000..0b73994dece5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2Reference/after/Expr.items @@ -0,0 +1,9 @@ +Types: +PsiParameter:pns : java.lang.Object +PsiReferenceExpression:pns : java.lang.Object +PsiReferenceExpression:pns : java.lang.Object + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2Reference/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2Reference/after/Expr.java new file mode 100644 index 000000000000..cf844f4eddf2 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2Reference/after/Expr.java @@ -0,0 +1,9 @@ +class Expr { + private String myString; + public void meth(Object pns, String ps) { + myString = ps + ps; + myString = ps + pns; + myString = pns + ps; + myString += ps; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2Reference/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2Reference/before/Expr.java new file mode 100644 index 000000000000..71b89f955e59 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2Reference/before/Expr.java @@ -0,0 +1,9 @@ +class Expr { + private String myString; + public void meth(int pns, String ps) { + myString = ps + ps; + myString = ps + pns; + myString = pns + ps; + myString += ps; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2String/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2String/after/Expr.items new file mode 100644 index 000000000000..46d6b1f5a15f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2String/after/Expr.items @@ -0,0 +1,9 @@ +Types: +PsiParameter:pns : java.lang.String +PsiReferenceExpression:pns : java.lang.String +PsiReferenceExpression:pns : java.lang.String + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2String/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2String/after/Expr.java new file mode 100644 index 000000000000..5ce2b795d268 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2String/after/Expr.java @@ -0,0 +1,9 @@ +class Expr { + private String myString; + public void meth(String pns, String ps) { + myString = ps + ps; + myString = ps + pns; + myString = pns + ps; + myString += ps; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2String/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2String/before/Expr.java new file mode 100644 index 000000000000..71b89f955e59 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatNumeric2String/before/Expr.java @@ -0,0 +1,9 @@ +class Expr { + private String myString; + public void meth(int pns, String ps) { + myString = ps + ps; + myString = ps + pns; + myString = pns + ps; + myString += ps; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Numeric/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Numeric/after/Expr.items new file mode 100644 index 000000000000..3bb9c1ebf19a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Numeric/after/Expr.items @@ -0,0 +1,17 @@ +Types: +PsiField:myString : int +PsiParameter:ps : int +PsiReferenceExpression:myString : int +PsiReferenceExpression:myString : int +PsiReferenceExpression:myString : int +PsiReferenceExpression:myString : int +PsiReferenceExpression:ps : int +PsiReferenceExpression:ps : int +PsiReferenceExpression:ps : int +PsiReferenceExpression:ps : int +PsiReferenceExpression:ps : int + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Numeric/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Numeric/after/Expr.java new file mode 100644 index 000000000000..ac05959f3c08 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Numeric/after/Expr.java @@ -0,0 +1,9 @@ +class Expr { + private int myString; + public void meth(int ps, int pns) { + myString = ps + ps; + myString = ps + pns; + myString = pns + ps; + myString += ps; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Numeric/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Numeric/before/Expr.java new file mode 100644 index 000000000000..bb57398b961c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Numeric/before/Expr.java @@ -0,0 +1,9 @@ +class Expr { + private String myString; + public void meth(String ps, int pns) { + myString = ps + ps; + myString = ps + pns; + myString = pns + ps; + myString += ps; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Reference/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Reference/after/Expr.items new file mode 100644 index 000000000000..302e3c9da48c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Reference/after/Expr.items @@ -0,0 +1,23 @@ +Types: +PsiField:myString : int +PsiParameter:ps : java.lang.Object +PsiReferenceExpression:myString : int +PsiReferenceExpression:myString : int +PsiReferenceExpression:myString : int +PsiReferenceExpression:myString : int +PsiReferenceExpression:ps : java.lang.Object +PsiReferenceExpression:ps : java.lang.Object +PsiReferenceExpression:ps : java.lang.Object +PsiReferenceExpression:ps : java.lang.Object +PsiReferenceExpression:ps : java.lang.Object + +Conversions: + +New expression type changes: +Fails: +myString->int +ps->java.lang.Object +ps->java.lang.Object +ps->java.lang.Object +ps->java.lang.Object +ps->java.lang.Object diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Reference/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Reference/after/Expr.java new file mode 100644 index 000000000000..c23893bd5b63 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Reference/after/Expr.java @@ -0,0 +1,9 @@ +class Expr { + private int myString; + public void meth(Object ps, int pns) { + myString = ps + ps; + myString = ps + pns; + myString = pns + ps; + myString += ps; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Reference/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Reference/before/Expr.java new file mode 100644 index 000000000000..bb57398b961c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprConcatString2Reference/before/Expr.java @@ -0,0 +1,9 @@ +class Expr { + private String myString; + public void meth(String ps, int pns) { + myString = ps + ps; + myString = ps + pns; + myString = pns + ps; + myString += ps; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofNeg/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofNeg/after/Expr.items new file mode 100644 index 000000000000..7712b490ec9a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofNeg/after/Expr.items @@ -0,0 +1,9 @@ +Types: +PsiParameter:p : java.util.List +PsiReferenceExpression:p : java.util.List + +Conversions: + +New expression type changes: +Fails: +p->java.util.List diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofNeg/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofNeg/after/Expr.java new file mode 100644 index 000000000000..93da179e0c37 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofNeg/after/Expr.java @@ -0,0 +1,9 @@ +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +class Expr { + public void meth(List p) { + boolean b = p instanceof HashSet; + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofNeg/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofNeg/before/Expr.java new file mode 100644 index 000000000000..72af0a04ab0b --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofNeg/before/Expr.java @@ -0,0 +1,9 @@ +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +class Expr { + public void meth(Set p) { + boolean b = p instanceof HashSet; + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofPos/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofPos/after/Expr.items new file mode 100644 index 000000000000..5b608c5c0b1a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofPos/after/Expr.items @@ -0,0 +1,8 @@ +Types: +PsiParameter:p : java.util.AbstractMap +PsiReferenceExpression:p : java.util.AbstractMap + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofPos/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofPos/after/Expr.java new file mode 100644 index 000000000000..e7f8a225bd9e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofPos/after/Expr.java @@ -0,0 +1,9 @@ +import java.util.AbstractMap; +import java.util.HashMap; +import java.util.Map; + +class Expr { + public void meth(AbstractMap p) { + boolean b = p instanceof HashMap; + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofPos/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofPos/before/Expr.java new file mode 100644 index 000000000000..fa8ab953a084 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprInstanceofPos/before/Expr.java @@ -0,0 +1,9 @@ +import java.util.AbstractMap; +import java.util.HashMap; +import java.util.Map; + +class Expr { + public void meth(Map p) { + boolean b = p instanceof HashMap; + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralBoolean/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralBoolean/after/Expr.items new file mode 100644 index 000000000000..b446d1101a06 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralBoolean/after/Expr.items @@ -0,0 +1,35 @@ +Types: +PsiField:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:myField : boolean + +Conversions: + +New expression type changes: +Fails: +"#"->boolean +'#'->boolean +043->boolean +043F->boolean +043L->boolean +0x23->boolean +0x23F->boolean +0x23L->boolean +35->boolean +35.0->boolean +35F->boolean +35L->boolean +null->boolean diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralBoolean/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralBoolean/after/Expr.java new file mode 100644 index 000000000000..d0d0a2d12326 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralBoolean/after/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private boolean myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralBoolean/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralBoolean/before/Expr.java new file mode 100644 index 000000000000..05b89dc47d4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralBoolean/before/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private Object myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralByte/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralByte/after/Expr.items new file mode 100644 index 000000000000..efc0c3bb0c41 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralByte/after/Expr.items @@ -0,0 +1,37 @@ +Types: +PsiField:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte + +Conversions: + +New expression type changes: +Fails: +"#"->byte +'#'->byte +043->byte +043F->byte +043L->byte +0x23->byte +0x23F->byte +0x23L->byte +35->byte +35.0->byte +35F->byte +35L->byte +false->byte +null->byte +true->byte diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralByte/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralByte/after/Expr.java new file mode 100644 index 000000000000..6288f06f450a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralByte/after/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private byte myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralByte/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralByte/before/Expr.java new file mode 100644 index 000000000000..05b89dc47d4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralByte/before/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private Object myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralChar/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralChar/after/Expr.items new file mode 100644 index 000000000000..62960ffeacf8 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralChar/after/Expr.items @@ -0,0 +1,36 @@ +Types: +PsiField:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char + +Conversions: + +New expression type changes: +Fails: +"#"->char +043->char +043F->char +043L->char +0x23->char +0x23F->char +0x23L->char +35->char +35.0->char +35F->char +35L->char +false->char +null->char +true->char diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralChar/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralChar/after/Expr.java new file mode 100644 index 000000000000..eab5b7cf5059 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralChar/after/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private char myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralChar/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralChar/before/Expr.java new file mode 100644 index 000000000000..05b89dc47d4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralChar/before/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private Object myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassExtends/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassExtends/after/Expr.items new file mode 100644 index 000000000000..2a1f903ca5ab --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassExtends/after/Expr.items @@ -0,0 +1,17 @@ +Types: +PsiField:myField : java.lang.Class<? extends java.util.Collection[]> +PsiReferenceExpression:myField : java.lang.Class<? extends java.util.Collection[]> +PsiReferenceExpression:myField : java.lang.Class<? extends java.util.Collection[]> +PsiReferenceExpression:myField : java.lang.Class<? extends java.util.Collection[]> +PsiReferenceExpression:myField : java.lang.Class<? extends java.util.Collection[]> +PsiReferenceExpression:myField : java.lang.Class<? extends java.util.Collection[]> + +Conversions: +Set[].class -> $ + +New expression type changes: +Fails: +Set.class->java.lang.Class<? extends java.util.Collection[]> +int.class->java.lang.Class<? extends java.util.Collection[]> +int[].class->java.lang.Class<? extends java.util.Collection[]> +void.class->java.lang.Class<? extends java.util.Collection[]> diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassExtends/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassExtends/after/Expr.java new file mode 100644 index 000000000000..a9f761e2bd1f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassExtends/after/Expr.java @@ -0,0 +1,13 @@ +import java.util.Collection; +import java.util.Set; + +class Expr { + private Class<? extends Collection[]> myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassExtends/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassExtends/before/Expr.java new file mode 100644 index 000000000000..202ef9ef2da6 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassExtends/before/Expr.java @@ -0,0 +1,13 @@ +import java.util.Collection; +import java.util.Set; + +class Expr { + private Object myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitive/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitive/after/Expr.items new file mode 100644 index 000000000000..485a0f5d91a4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitive/after/Expr.items @@ -0,0 +1,16 @@ +Types: +PsiField:myField : java.lang.Class<java.lang.Integer> +PsiReferenceExpression:myField : java.lang.Class<java.lang.Integer> +PsiReferenceExpression:myField : java.lang.Class<java.lang.Integer> +PsiReferenceExpression:myField : java.lang.Class<java.lang.Integer> +PsiReferenceExpression:myField : java.lang.Class<java.lang.Integer> +PsiReferenceExpression:myField : java.lang.Class<java.lang.Integer> + +Conversions: + +New expression type changes: +Fails: +Set.class->java.lang.Class<java.lang.Integer> +Set[].class->java.lang.Class<java.lang.Integer> +int[].class->java.lang.Class<java.lang.Integer> +void.class->java.lang.Class<java.lang.Integer> diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitive/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitive/after/Expr.java new file mode 100644 index 000000000000..44edef75bfe4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitive/after/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Class<Integer> myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitive/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitive/before/Expr.java new file mode 100644 index 000000000000..35a3d63f8dea --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitive/before/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Object myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitiveArray/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitiveArray/after/Expr.items new file mode 100644 index 000000000000..cd609774cf24 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitiveArray/after/Expr.items @@ -0,0 +1,16 @@ +Types: +PsiField:myField : java.lang.Class<int[]> +PsiReferenceExpression:myField : java.lang.Class<int[]> +PsiReferenceExpression:myField : java.lang.Class<int[]> +PsiReferenceExpression:myField : java.lang.Class<int[]> +PsiReferenceExpression:myField : java.lang.Class<int[]> +PsiReferenceExpression:myField : java.lang.Class<int[]> + +Conversions: + +New expression type changes: +Fails: +Set.class->java.lang.Class<int[]> +Set[].class->java.lang.Class<int[]> +int.class->java.lang.Class<int[]> +void.class->java.lang.Class<int[]> diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitiveArray/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitiveArray/after/Expr.java new file mode 100644 index 000000000000..9939d2f3d410 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitiveArray/after/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Class<int[]> myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitiveArray/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitiveArray/before/Expr.java new file mode 100644 index 000000000000..35a3d63f8dea --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassPrimitiveArray/before/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Object myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassRaw/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassRaw/after/Expr.items new file mode 100644 index 000000000000..0bda2fd18195 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassRaw/after/Expr.items @@ -0,0 +1,17 @@ +Types: +PsiField:myField : java.lang.Class +PsiReferenceExpression:myField : java.lang.Class +PsiReferenceExpression:myField : java.lang.Class +PsiReferenceExpression:myField : java.lang.Class +PsiReferenceExpression:myField : java.lang.Class +PsiReferenceExpression:myField : java.lang.Class + +Conversions: +Set.class -> $ +Set[].class -> $ +int.class -> $ +int[].class -> $ +void.class -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassRaw/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassRaw/after/Expr.java new file mode 100644 index 000000000000..9edcf9d47a31 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassRaw/after/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Class myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassRaw/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassRaw/before/Expr.java new file mode 100644 index 000000000000..35a3d63f8dea --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassRaw/before/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Object myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReference/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReference/after/Expr.items new file mode 100644 index 000000000000..ee8fece53e89 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReference/after/Expr.items @@ -0,0 +1,16 @@ +Types: +PsiField:myField : java.lang.Class<java.util.Set> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set> + +Conversions: + +New expression type changes: +Fails: +Set[].class->java.lang.Class<java.util.Set> +int.class->java.lang.Class<java.util.Set> +int[].class->java.lang.Class<java.util.Set> +void.class->java.lang.Class<java.util.Set> diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReference/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReference/after/Expr.java new file mode 100644 index 000000000000..45fd995735ae --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReference/after/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Class<Set> myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReference/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReference/before/Expr.java new file mode 100644 index 000000000000..35a3d63f8dea --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReference/before/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Object myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReferenceArray/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReferenceArray/after/Expr.items new file mode 100644 index 000000000000..26be6c5d8e6f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReferenceArray/after/Expr.items @@ -0,0 +1,16 @@ +Types: +PsiField:myField : java.lang.Class<java.util.Set[]> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set[]> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set[]> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set[]> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set[]> +PsiReferenceExpression:myField : java.lang.Class<java.util.Set[]> + +Conversions: + +New expression type changes: +Fails: +Set.class->java.lang.Class<java.util.Set[]> +int.class->java.lang.Class<java.util.Set[]> +int[].class->java.lang.Class<java.util.Set[]> +void.class->java.lang.Class<java.util.Set[]> diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReferenceArray/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReferenceArray/after/Expr.java new file mode 100644 index 000000000000..46b110d7f75f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReferenceArray/after/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Class<Set[]> myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReferenceArray/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReferenceArray/before/Expr.java new file mode 100644 index 000000000000..35a3d63f8dea --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassReferenceArray/before/Expr.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Expr { + private Object myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassSuper/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassSuper/after/Expr.items new file mode 100644 index 000000000000..61336d444497 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassSuper/after/Expr.items @@ -0,0 +1,17 @@ +Types: +PsiField:myField : java.lang.Class<? super java.util.AbstractSet[]> +PsiReferenceExpression:myField : java.lang.Class<? super java.util.AbstractSet[]> +PsiReferenceExpression:myField : java.lang.Class<? super java.util.AbstractSet[]> +PsiReferenceExpression:myField : java.lang.Class<? super java.util.AbstractSet[]> +PsiReferenceExpression:myField : java.lang.Class<? super java.util.AbstractSet[]> +PsiReferenceExpression:myField : java.lang.Class<? super java.util.AbstractSet[]> + +Conversions: +Set[].class -> $ + +New expression type changes: +Fails: +Set.class->java.lang.Class<? super java.util.AbstractSet[]> +int.class->java.lang.Class<? super java.util.AbstractSet[]> +int[].class->java.lang.Class<? super java.util.AbstractSet[]> +void.class->java.lang.Class<? super java.util.AbstractSet[]> diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassSuper/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassSuper/after/Expr.java new file mode 100644 index 000000000000..3ae94c8c1228 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassSuper/after/Expr.java @@ -0,0 +1,13 @@ +import java.util.AbstractSet; +import java.util.Set; + +class Expr { + private Class<? super AbstractSet[]> myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassSuper/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassSuper/before/Expr.java new file mode 100644 index 000000000000..1e5b26a44e4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralClassSuper/before/Expr.java @@ -0,0 +1,13 @@ +import java.util.AbstractSet; +import java.util.Set; + +class Expr { + private Object myField; + public void meth() { + myField = int.class; + myField = int[].class; + myField = Set.class; + myField = Set[].class; + myField = void.class; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralDouble/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralDouble/after/Expr.items new file mode 100644 index 000000000000..eb7229ef905e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralDouble/after/Expr.items @@ -0,0 +1,36 @@ +Types: +PsiField:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double +PsiReferenceExpression:myField : double + +Conversions: +'#' -> $ +043 -> $ +043F -> $ +043L -> $ +0x23 -> $ +0x23F -> $ +0x23L -> $ +35 -> $ +35F -> $ +35L -> $ + +New expression type changes: +Fails: +"#"->double +false->double +null->double +true->double diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralDouble/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralDouble/after/Expr.java new file mode 100644 index 000000000000..a1fafc25fe6e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralDouble/after/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private double myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralDouble/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralDouble/before/Expr.java new file mode 100644 index 000000000000..05b89dc47d4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralDouble/before/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private Object myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralFloat/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralFloat/after/Expr.items new file mode 100644 index 000000000000..dcf1562d69b7 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralFloat/after/Expr.items @@ -0,0 +1,35 @@ +Types: +PsiField:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float + +Conversions: +'#' -> $ +043 -> $ +043L -> $ +0x23 -> $ +0x23F -> $ +0x23L -> $ +35 -> $ +35L -> $ + +New expression type changes: +Fails: +"#"->float +35.0->float +false->float +null->float +true->float diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralFloat/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralFloat/after/Expr.java new file mode 100644 index 000000000000..8210b283c426 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralFloat/after/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private float myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralFloat/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralFloat/before/Expr.java new file mode 100644 index 000000000000..05b89dc47d4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralFloat/before/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private Object myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralInt/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralInt/after/Expr.items new file mode 100644 index 000000000000..6969f1efd214 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralInt/after/Expr.items @@ -0,0 +1,33 @@ +Types: +PsiField:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int + +Conversions: +'#' -> $ + +New expression type changes: +Fails: +"#"->int +043F->int +043L->int +0x23L->int +35.0->int +35F->int +35L->int +false->int +null->int +true->int diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralInt/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralInt/after/Expr.java new file mode 100644 index 000000000000..51bce6ac6430 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralInt/after/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private int myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralInt/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralInt/before/Expr.java new file mode 100644 index 000000000000..05b89dc47d4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralInt/before/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private Object myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralLong/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralLong/after/Expr.items new file mode 100644 index 000000000000..71718fa25bb1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralLong/after/Expr.items @@ -0,0 +1,34 @@ +Types: +PsiField:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long + +Conversions: +'#' -> $ +043 -> $ +0x23 -> $ +0x23F -> $ +35 -> $ + +New expression type changes: +Fails: +"#"->long +043F->long +35.0->long +35F->long +false->long +null->long +true->long diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralLong/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralLong/after/Expr.java new file mode 100644 index 000000000000..1556e9f05ffb --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralLong/after/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private long myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralLong/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralLong/before/Expr.java new file mode 100644 index 000000000000..05b89dc47d4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralLong/before/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private Object myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralShort/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralShort/after/Expr.items new file mode 100644 index 000000000000..f282b956c933 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralShort/after/Expr.items @@ -0,0 +1,37 @@ +Types: +PsiField:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short + +Conversions: + +New expression type changes: +Fails: +"#"->short +'#'->short +043->short +043F->short +043L->short +0x23->short +0x23F->short +0x23L->short +35->short +35.0->short +35F->short +35L->short +false->short +null->short +true->short diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralShort/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralShort/after/Expr.java new file mode 100644 index 000000000000..39b549b335bb --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralShort/after/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private short myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralShort/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralShort/before/Expr.java new file mode 100644 index 000000000000..05b89dc47d4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralShort/before/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private Object myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralString/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralString/after/Expr.items new file mode 100644 index 000000000000..6bb1edafdfa8 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralString/after/Expr.items @@ -0,0 +1,35 @@ +Types: +PsiField:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String +PsiReferenceExpression:myField : java.lang.String + +Conversions: + +New expression type changes: +Fails: +'#'->java.lang.String +043->java.lang.String +043F->java.lang.String +043L->java.lang.String +0x23->java.lang.String +0x23F->java.lang.String +0x23L->java.lang.String +35->java.lang.String +35.0->java.lang.String +35F->java.lang.String +35L->java.lang.String +false->java.lang.String +true->java.lang.String diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralString/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralString/after/Expr.java new file mode 100644 index 000000000000..3adc44418ad4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralString/after/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private String myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralString/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralString/before/Expr.java new file mode 100644 index 000000000000..05b89dc47d4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprLiteralString/before/Expr.java @@ -0,0 +1,27 @@ +class Expr { + private Object myField; + public void meth() { + myField = null; + + myField = false; + myField = true; + + myField = 043; + myField = 35; + myField = 0x23; + + myField = '#'; + + myField = 043L; + myField = 35L; + myField = 0x23L; + + myField = 043F; + myField = 35F; + myField = 0x23F; + + myField = 35.0; + + myField = "#"; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Lvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Lvalue/after/Expr.items new file mode 100644 index 000000000000..444531918ce0 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Lvalue/after/Expr.items @@ -0,0 +1,22 @@ +Types: +PsiArrayInitializerExpression:{pfc} : FaceParent[][] +PsiArrayInitializerExpression:{pfc} : FaceParent[][] +PsiArrayInitializerExpression:{{pfc}} : FaceParent[][][] +PsiField:myArrayOne : FaceParent[][] +PsiField:myArrayTwo : FaceParent[][][] +PsiNewExpression:new FaceChild[][][]{{pfc}} : FaceParent[][][] +PsiNewExpression:new FaceChild[][]{pfc} : FaceParent[][] +PsiParameter:pfc : FaceParent[] +PsiReferenceExpression:myArrayOne : FaceParent[][] +PsiReferenceExpression:myArrayTwo : FaceParent[][][] +PsiReferenceExpression:pfc : FaceParent[] +PsiReferenceExpression:pfc : FaceParent[] + +Conversions: +pfc -> $ +pfc -> $ + +New expression type changes: +new FaceChild[][][]{{pfc}} -> FaceParent[][][] +new FaceChild[][]{pfc} -> FaceParent[][] +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Lvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Lvalue/after/Expr.java new file mode 100644 index 000000000000..570367998bd1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Lvalue/after/Expr.java @@ -0,0 +1,11 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} + +class Expr { + private FaceParent[][] myArrayOne; + private FaceParent[][][] myArrayTwo; + public void meth(FaceParent[] pfc) { + myArrayOne = new FaceParent[][]{pfc}; + myArrayTwo = new FaceParent[][][]{{pfc}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Lvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Lvalue/before/Expr.java new file mode 100644 index 000000000000..d88808766d7d --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Lvalue/before/Expr.java @@ -0,0 +1,11 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} + +class Expr { + private FaceChild[][] myArrayOne; + private FaceChild[][][] myArrayTwo; + public void meth(FaceChild[] pfc) { + myArrayOne = new FaceChild[][]{pfc}; + myArrayTwo = new FaceChild[][][]{{pfc}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Rvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Rvalue/after/Expr.items new file mode 100644 index 000000000000..4b4b9036abb0 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Rvalue/after/Expr.items @@ -0,0 +1,14 @@ +Types: +PsiArrayInitializerExpression:{null} : ClassParent[][] +PsiArrayInitializerExpression:{pfc} : ClassParent[][] +PsiField:myField : ClassParent[][][] +PsiNewExpression:new FaceChild[][][]{{pfc}, {null}, null} : ClassParent[][][] +PsiParameter:pfc : ClassParent[] +PsiReferenceExpression:myField : ClassParent[][][] +PsiReferenceExpression:pfc : ClassParent[] + +Conversions: + +New expression type changes: +new FaceChild[][][]{{pfc}, {null}, null} -> ClassParent[][][] +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Rvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Rvalue/after/Expr.java new file mode 100644 index 000000000000..fc54bb6ca9d6 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Rvalue/after/Expr.java @@ -0,0 +1,11 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Expr { + private ClassParent[][][] myField; + public void meth(ClassParent[] pfc) { + myField = new ClassParent[][][]{{pfc}, {null}, null}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Rvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Rvalue/before/Expr.java new file mode 100644 index 000000000000..8c4093e44d75 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayArray2Rvalue/before/Expr.java @@ -0,0 +1,11 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Expr { + private FaceChild[][][] myField; + public void meth(FaceChild[] pfc) { + myField = new FaceChild[][][]{{pfc}, {null}, null}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayGen2Rvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayGen2Rvalue/after/Expr.items new file mode 100644 index 000000000000..825ef4f10f19 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayGen2Rvalue/after/Expr.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : java.util.Set<java.lang.Integer>[] +PsiReferenceExpression:myField : java.util.Set<java.lang.Integer>[] + +Conversions: + +New expression type changes: +Fails: +new Set[1]->java.util.Set<java.lang.Integer>[] diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayGen2Rvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayGen2Rvalue/after/Expr.java new file mode 100644 index 000000000000..5083896eb293 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayGen2Rvalue/after/Expr.java @@ -0,0 +1,8 @@ +import java.util.Set; + +class Expr { + private Set<Integer>[] myField; + public void meth() { + myField = new Set[1]; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayGen2Rvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayGen2Rvalue/before/Expr.java new file mode 100644 index 000000000000..c2301a434ec9 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayGen2Rvalue/before/Expr.java @@ -0,0 +1,8 @@ +import java.util.Set; + +class Expr { + private Set[] myField; + public void meth() { + myField = new Set[1]; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Lvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Lvalue/after/Expr.items new file mode 100644 index 000000000000..d5976f11c486 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Lvalue/after/Expr.items @@ -0,0 +1,25 @@ +Types: +PsiArrayInitializerExpression:{!p} : int[] +PsiArrayInitializerExpression:{p} : int[] +PsiArrayInitializerExpression:{p} : int[] +PsiArrayInitializerExpression:{{p}, {!p}} : int[][] +PsiField:myArrayOne : int[] +PsiField:myArrayTwo : int[][] +PsiNewExpression:new boolean[][]{{p}, {!p}} : int[][] +PsiNewExpression:new boolean[]{p} : int[] +PsiParameter:p : int +PsiReferenceExpression:myArrayOne : int[] +PsiReferenceExpression:myArrayTwo : int[][] +PsiReferenceExpression:p : int +PsiReferenceExpression:p : int +PsiReferenceExpression:p : int + +Conversions: +p -> $ +p -> $ + +New expression type changes: +new boolean[][]{{p}, {!p}} -> int[][] +new boolean[]{p} -> int[] +Fails: +!p->int diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Lvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Lvalue/after/Expr.java new file mode 100644 index 000000000000..0c6c31bf4929 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Lvalue/after/Expr.java @@ -0,0 +1,8 @@ +class Expr { + private int[] myArrayOne; + private int[][] myArrayTwo; + public void meth(int p) { + myArrayOne = new int[]{p}; + myArrayTwo = new int[][]{{p}, {!p}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Lvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Lvalue/before/Expr.java new file mode 100644 index 000000000000..e7724ca422f4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Lvalue/before/Expr.java @@ -0,0 +1,8 @@ +class Expr { + private boolean[] myArrayOne; + private boolean[][] myArrayTwo; + public void meth(boolean p) { + myArrayOne = new boolean[]{p}; + myArrayTwo = new boolean[][]{{p}, {!p}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Rvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Rvalue/after/Expr.items new file mode 100644 index 000000000000..5f371c0c6430 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Rvalue/after/Expr.items @@ -0,0 +1,21 @@ +Types: +PsiArrayInitializerExpression:{!p} : int[] +PsiArrayInitializerExpression:{0} : int[] +PsiArrayInitializerExpression:{p} : int[] +PsiArrayInitializerExpression:{true} : int[] +PsiArrayInitializerExpression:{{p}, {!p}, {true}, {0}} : int[][] +PsiField:myField : int[][] +PsiNewExpression:new boolean[][]{{p}, {!p}, {true}, {0}} : int[][] +PsiParameter:p : int +PsiReferenceExpression:myField : int[][] +PsiReferenceExpression:p : int +PsiReferenceExpression:p : int + +Conversions: +p -> $ + +New expression type changes: +new boolean[][]{{p}, {!p}, {true}, {0}} -> int[][] +Fails: +!p->int +true->int diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Rvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Rvalue/after/Expr.java new file mode 100644 index 000000000000..58017644820c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Rvalue/after/Expr.java @@ -0,0 +1,6 @@ +class Expr { + private int[][] myField; + public void meth(int p) { + myField = new int[][]{{p}, {!p}, {true}, {0}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Rvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Rvalue/before/Expr.java new file mode 100644 index 000000000000..cb1e0d64aa4b --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayPrimitive2Rvalue/before/Expr.java @@ -0,0 +1,6 @@ +class Expr { + private boolean[][] myField; + public void meth(boolean p) { + myField = new boolean[][]{{p}, {!p}, {true}, {0}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Lvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Lvalue/after/Expr.items new file mode 100644 index 000000000000..a1472a46da67 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Lvalue/after/Expr.items @@ -0,0 +1,34 @@ +Types: +PsiArrayInitializerExpression:{pcc} : FaceParent[] +PsiArrayInitializerExpression:{pcp} : FaceParent[] +PsiArrayInitializerExpression:{pfc, pcp, pcc} : FaceParent[] +PsiArrayInitializerExpression:{pfc} : FaceParent[] +PsiArrayInitializerExpression:{{pfc}, {pcp}, {pcc}} : FaceParent[][] +PsiField:myArrayOne : FaceParent[] +PsiField:myArrayTwo : FaceParent[][] +PsiNewExpression:new FaceChild[][]{{pfc}, {pcp}, {pcc}} : FaceParent[][] +PsiNewExpression:new FaceChild[]{pfc, pcp, pcc} : FaceParent[] +PsiParameter:pcc : ClassChild +PsiParameter:pcp : ClassParent +PsiParameter:pfc : FaceParent +PsiReferenceExpression:myArrayOne : FaceParent[] +PsiReferenceExpression:myArrayTwo : FaceParent[][] +PsiReferenceExpression:pcc : ClassChild +PsiReferenceExpression:pcc : ClassChild +PsiReferenceExpression:pcp : ClassParent +PsiReferenceExpression:pcp : ClassParent +PsiReferenceExpression:pfc : FaceParent +PsiReferenceExpression:pfc : FaceParent + +Conversions: +pcc -> $ +pcc -> $ +pcp -> $ +pcp -> $ +pfc -> $ +pfc -> $ + +New expression type changes: +new FaceChild[][]{{pfc}, {pcp}, {pcc}} -> FaceParent[][] +new FaceChild[]{pfc, pcp, pcc} -> FaceParent[] +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Lvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Lvalue/after/Expr.java new file mode 100644 index 000000000000..bfae5390508e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Lvalue/after/Expr.java @@ -0,0 +1,13 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Expr { + private FaceParent[] myArrayOne; + private FaceParent[][] myArrayTwo; + public void meth(FaceParent pfc, ClassParent pcp, ClassChild pcc) { + myArrayOne = new FaceParent[]{pfc, pcp, pcc}; + myArrayTwo = new FaceParent[][]{{pfc}, {pcp}, {pcc}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Lvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Lvalue/before/Expr.java new file mode 100644 index 000000000000..5cb70f7265f7 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Lvalue/before/Expr.java @@ -0,0 +1,13 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Expr { + private FaceChild[] myArrayOne; + private FaceChild[][] myArrayTwo; + public void meth(FaceChild pfc, ClassParent pcp, ClassChild pcc) { + myArrayOne = new FaceChild[]{pfc, pcp, pcc}; + myArrayTwo = new FaceChild[][]{{pfc}, {pcp}, {pcc}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Rvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Rvalue/after/Expr.items new file mode 100644 index 000000000000..4dabd7d9161e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Rvalue/after/Expr.items @@ -0,0 +1,18 @@ +Types: +PsiArrayInitializerExpression:{null} : ClassParent[] +PsiArrayInitializerExpression:{pcc} : ClassParent[] +PsiArrayInitializerExpression:{pcp} : ClassParent[] +PsiArrayInitializerExpression:{pfc} : ClassParent[] +PsiField:myField : ClassParent[][] +PsiNewExpression:new FaceChild[][]{{pfc}, {pcp}, {pcc}, {null}} : ClassParent[][] +PsiParameter:pcc : ClassChild +PsiParameter:pfc : ClassParent +PsiReferenceExpression:myField : ClassParent[][] +PsiReferenceExpression:pcc : ClassChild +PsiReferenceExpression:pfc : ClassParent + +Conversions: + +New expression type changes: +new FaceChild[][]{{pfc}, {pcp}, {pcc}, {null}} -> ClassParent[][] +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Rvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Rvalue/after/Expr.java new file mode 100644 index 000000000000..f2d53b50f272 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Rvalue/after/Expr.java @@ -0,0 +1,11 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Expr { + private ClassParent[][] myField; + public void meth(ClassParent pfc, ClassParent pcp, ClassChild pcc) { + myField = new ClassParent[][]{{pfc}, {pcp}, {pcc}, {null}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Rvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Rvalue/before/Expr.java new file mode 100644 index 000000000000..9e973b7925a0 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewArrayReftype2Rvalue/before/Expr.java @@ -0,0 +1,11 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Expr { + private FaceChild[][] myField; + public void meth(FaceChild pfc, ClassParent pcp, ClassChild pcc) { + myField = new FaceChild[][]{{pfc}, {pcp}, {pcc}, {null}}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGen/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGen/after/Expr.items new file mode 100644 index 000000000000..d19a8ab094b7 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGen/after/Expr.items @@ -0,0 +1,17 @@ +Types: +PsiField:myField : java.util.Set<Subject> +PsiNewExpression:new Set() : java.util.Set +PsiNewExpression:new Set<Ancestor>() : java.util.Set<Subject> +PsiNewExpression:new Set<Descendant>() : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> + +Conversions: + +New expression type changes: +new Set() -> java.util.Set +new Set<Ancestor>() -> java.util.Set<Subject> +new Set<Descendant>() -> java.util.Set<Subject> +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGen/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGen/after/Expr.java new file mode 100644 index 000000000000..aab73939b929 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGen/after/Expr.java @@ -0,0 +1,15 @@ +import java.util.Set; + +class Ancestor {} +class Subject extends Ancestor {} +class Descendant extends Subject {} + +class Expr { + private Set<Subject> myField; + public void meth() { + myField = new Set(); + myField = new Set<Subject>(); + myField = new Set<Subject>(); + myField = new Set<Subject>(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGen/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGen/before/Expr.java new file mode 100644 index 000000000000..e38d8aa7229f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGen/before/Expr.java @@ -0,0 +1,15 @@ +import java.util.Set; + +class Ancestor {} +class Subject extends Ancestor {} +class Descendant extends Subject {} + +class Expr { + private Object myField; + public void meth() { + myField = new Set(); + myField = new Set<Ancestor>(); + myField = new Set<Subject>(); + myField = new Set<Descendant>(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenExtends/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenExtends/after/Expr.items new file mode 100644 index 000000000000..9003258e73a5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenExtends/after/Expr.items @@ -0,0 +1,16 @@ +Types: +PsiField:myField : java.util.Set<? extends Subject> +PsiNewExpression:new Set() : java.util.Set +PsiNewExpression:new Set<Ancestor>() : java.util.Set<Subject> +PsiNewExpression:new Set<Subject>() : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<? extends Subject> +PsiReferenceExpression:myField : java.util.Set<? extends Subject> +PsiReferenceExpression:myField : java.util.Set<? extends Subject> + +Conversions: + +New expression type changes: +new Set() -> java.util.Set +new Set<Ancestor>() -> java.util.Set<Subject> +new Set<Subject>() -> java.util.Set<Subject> +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenExtends/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenExtends/after/Expr.java new file mode 100644 index 000000000000..f939534d6972 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenExtends/after/Expr.java @@ -0,0 +1,15 @@ +import java.util.Set; + +class Ancestor {} +class Subject extends Ancestor {} +class Descendant extends Subject {} + +class Expr { + private Set<? extends Subject> myField; + public void meth() { + myField = new Set(); + myField = new Set<Subject>(); + myField = new Set<Subject>(); + // myField = new Set<Descendant>(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenExtends/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenExtends/before/Expr.java new file mode 100644 index 000000000000..e65ce8b9a8fc --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenExtends/before/Expr.java @@ -0,0 +1,15 @@ +import java.util.Set; + +class Ancestor {} +class Subject extends Ancestor {} +class Descendant extends Subject {} + +class Expr { + private Object myField; + public void meth() { + myField = new Set(); + myField = new Set<Ancestor>(); + myField = new Set<Subject>(); + // myField = new Set<Descendant>(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenSuper/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenSuper/after/Expr.items new file mode 100644 index 000000000000..ca323d833a2c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenSuper/after/Expr.items @@ -0,0 +1,10 @@ +Types: +PsiField:myField : java.util.Set<? super Subject> +PsiNewExpression:new Set() : java.util.Set +PsiReferenceExpression:myField : java.util.Set<? super Subject> + +Conversions: + +New expression type changes: +new Set() -> java.util.Set +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenSuper/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenSuper/after/Expr.java new file mode 100644 index 000000000000..4f5a29eecc6c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenSuper/after/Expr.java @@ -0,0 +1,15 @@ +import java.util.Set; + +class Ancestor {} +class Subject extends Ancestor {} +class Descendant extends Subject {} + +class Expr { + private Set<? super Subject> myField; + public void meth() { + myField = new Set(); + // myField = new Set<Ancestor>(); + // myField = new Set<Subject>(); + // myField = new Set<Descendant>(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenSuper/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenSuper/before/Expr.java new file mode 100644 index 000000000000..73a22ebeccde --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewGenSuper/before/Expr.java @@ -0,0 +1,15 @@ +import java.util.Set; + +class Ancestor {} +class Subject extends Ancestor {} +class Descendant extends Subject {} + +class Expr { + private Object myField; + public void meth() { + myField = new Set(); + // myField = new Set<Ancestor>(); + // myField = new Set<Subject>(); + // myField = new Set<Descendant>(); + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewReference/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewReference/after/Expr.items new file mode 100644 index 000000000000..cab7f8173076 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewReference/after/Expr.items @@ -0,0 +1,27 @@ +Types: +PsiField:myField : Expr.Subject +PsiNewExpression:new Descendant() : Expr.Descendant +PsiNewExpression:new Descendant() {} : Expr.Descendant +PsiNewExpression:new Subject() {} : Expr.Subject +PsiNewExpression:this.new Descendant() : Expr.Descendant +PsiReferenceExpression:myField : Expr.Subject +PsiReferenceExpression:myField : Expr.Subject +PsiReferenceExpression:myField : Expr.Subject +PsiReferenceExpression:myField : Expr.Subject +PsiReferenceExpression:myField : Expr.Subject +PsiReferenceExpression:myField : Expr.Subject +PsiReferenceExpression:myField : Expr.Subject +PsiReferenceExpression:myField : Expr.Subject +PsiReferenceExpression:myField : Expr.Subject + +Conversions: + +New expression type changes: +new Descendant() -> Expr.Descendant +new Descendant() {} -> Expr.Descendant +new Subject() {} -> Expr.Subject +this.new Descendant() -> Expr.Descendant +Fails: +new Ancestor()->Expr.Subject +new Ancestor() {}->Expr.Subject +this.new Ancestor()->Expr.Subject diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewReference/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewReference/after/Expr.java new file mode 100644 index 000000000000..5cc9c87ec7e4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewReference/after/Expr.java @@ -0,0 +1,21 @@ +class Expr { + private class Ancestor {} + private class Subject extends Ancestor {} + private class Descendant extends Subject {} + + private Subject myField; + + public void meth() { + myField = new Ancestor(); + myField = this.new Ancestor(); + myField = new Ancestor() {}; + + myField = new Subject(); + myField = this.new Subject(); + myField = new Subject() {}; + + myField = new Descendant(); + myField = this.new Descendant(); + myField = new Descendant() {}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewReference/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewReference/before/Expr.java new file mode 100644 index 000000000000..ed03e4ddc1d3 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprNewReference/before/Expr.java @@ -0,0 +1,21 @@ +class Expr { + private class Ancestor {} + private class Subject extends Ancestor {} + private class Descendant extends Subject {} + + private Ancestor myField; + + public void meth() { + myField = new Ancestor(); + myField = this.new Ancestor(); + myField = new Ancestor() {}; + + myField = new Subject(); + myField = this.new Subject(); + myField = new Subject() {}; + + myField = new Descendant(); + myField = this.new Descendant(); + myField = new Descendant() {}; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Lvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Lvalue/after/Expr.items new file mode 100644 index 000000000000..e91631f5c332 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Lvalue/after/Expr.items @@ -0,0 +1,9 @@ +Types: +PsiMethod:meth : java.lang.String +PsiParameter:p : java.lang.String +PsiReferenceExpression:p : java.lang.String + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Lvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Lvalue/after/Expr.java new file mode 100644 index 000000000000..37c310d405e3 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Lvalue/after/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public String meth(String p) { + return p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Lvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Lvalue/before/Expr.java new file mode 100644 index 000000000000..76e26b5c15bb --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Lvalue/before/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public int meth(int p) { + return p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Rvalue/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Rvalue/after/Expr.items new file mode 100644 index 000000000000..e91631f5c332 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Rvalue/after/Expr.items @@ -0,0 +1,9 @@ +Types: +PsiMethod:meth : java.lang.String +PsiParameter:p : java.lang.String +PsiReferenceExpression:p : java.lang.String + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Rvalue/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Rvalue/after/Expr.java new file mode 100644 index 000000000000..37c310d405e3 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Rvalue/after/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public String meth(String p) { + return p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Rvalue/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Rvalue/before/Expr.java new file mode 100644 index 000000000000..76e26b5c15bb --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprReturn2Rvalue/before/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public int meth(int p) { + return p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprTernary/after/Expr.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprTernary/after/Expr.items new file mode 100644 index 000000000000..6e445ca2c431 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprTernary/after/Expr.items @@ -0,0 +1,10 @@ +Types: +PsiLocalVariable:v : java.lang.String +PsiParameter:pd : java.lang.String +PsiReferenceExpression:pd : java.lang.String +PsiReferenceExpression:pd : java.lang.String + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprTernary/after/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprTernary/after/Expr.java new file mode 100644 index 000000000000..1e75f910f300 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprTernary/after/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public void meth(String pd, int pp) { + String v = pp > 0 ? pd : pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/exprTernary/before/Expr.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprTernary/before/Expr.java new file mode 100644 index 000000000000..3a714e5334a4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/exprTernary/before/Expr.java @@ -0,0 +1,5 @@ +class Expr { + public void meth(double pd, int pp) { + double v = pp > 0 ? pd : pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingDown/after/Overriding.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingDown/after/Overriding.java new file mode 100644 index 000000000000..9fb5b2161ba1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingDown/after/Overriding.java @@ -0,0 +1,13 @@ +class Parent { + private byte myInt; + public byte getInt() { + return myInt; + } +} + +class Child extends Parent { + private byte myInt; + public byte getInt() { + return myInt; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingDown/after/Parent.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingDown/after/Parent.items new file mode 100644 index 000000000000..0857363a2808 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingDown/after/Parent.items @@ -0,0 +1,12 @@ +Types: +PsiField:myInt : byte +PsiField:myInt : byte +PsiMethod:getInt : byte +PsiMethod:getInt : byte +PsiReferenceExpression:myInt : byte +PsiReferenceExpression:myInt : byte + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingDown/before/Overriding.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingDown/before/Overriding.java new file mode 100644 index 000000000000..212ce8080636 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingDown/before/Overriding.java @@ -0,0 +1,13 @@ +class Parent { + private int myInt; + public int getInt() { + return myInt; + } +} + +class Child extends Parent { + private int myInt; + public int getInt() { + return myInt; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingUp/after/Child.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingUp/after/Child.items new file mode 100644 index 000000000000..0857363a2808 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingUp/after/Child.items @@ -0,0 +1,12 @@ +Types: +PsiField:myInt : byte +PsiField:myInt : byte +PsiMethod:getInt : byte +PsiMethod:getInt : byte +PsiReferenceExpression:myInt : byte +PsiReferenceExpression:myInt : byte + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingUp/after/Overriding.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingUp/after/Overriding.java new file mode 100644 index 000000000000..9fb5b2161ba1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingUp/after/Overriding.java @@ -0,0 +1,13 @@ +class Parent { + private byte myInt; + public byte getInt() { + return myInt; + } +} + +class Child extends Parent { + private byte myInt; + public byte getInt() { + return myInt; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingUp/before/Overriding.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingUp/before/Overriding.java new file mode 100644 index 000000000000..212ce8080636 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/overridingUp/before/Overriding.java @@ -0,0 +1,13 @@ +class Parent { + private int myInt; + public int getInt() { + return myInt; + } +} + +class Child extends Parent { + private int myInt; + public int getInt() { + return myInt; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/specJavadoc/after/Spec.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/specJavadoc/after/Spec.items new file mode 100644 index 000000000000..4428712f4683 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/specJavadoc/after/Spec.items @@ -0,0 +1,8 @@ +Types: +PsiParameter:p : java.util.Set + +Conversions: +#meth(double) -> PsiMethod:meth + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/specJavadoc/after/Spec.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/specJavadoc/after/Spec.java new file mode 100644 index 000000000000..b6c748c1e749 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/specJavadoc/after/Spec.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Spec { + /** + * @see #meth(java.util.Set) + */ + public void methRef() { + } + + public void meth(Set p) { + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/specJavadoc/before/Spec.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/specJavadoc/before/Spec.java new file mode 100644 index 000000000000..45080dc2dec1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/specJavadoc/before/Spec.java @@ -0,0 +1,12 @@ +import java.util.Set; + +class Spec { + /** + * @see #meth(double) + */ + public void methRef() { + } + + public void meth(double p) { + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/specNotUsed/after/Spec.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/specNotUsed/after/Spec.items new file mode 100644 index 000000000000..8ffc5c9a6744 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/specNotUsed/after/Spec.items @@ -0,0 +1,7 @@ +Types: +PsiField:myField : boolean + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/specNotUsed/after/Spec.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/specNotUsed/after/Spec.java new file mode 100644 index 000000000000..03d0dc267246 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/specNotUsed/after/Spec.java @@ -0,0 +1,3 @@ +class Spec { + private boolean myField; +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/specNotUsed/before/Spec.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/specNotUsed/before/Spec.java new file mode 100644 index 000000000000..36a606c54faa --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/specNotUsed/before/Spec.java @@ -0,0 +1,3 @@ +class Spec { + private int myField; +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Lvalue/after/Type.items new file mode 100644 index 000000000000..e56da57e1062 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Lvalue/after/Type.items @@ -0,0 +1,13 @@ +Types: +PsiField:myDescendants : Subject[] +PsiParameter:p : Subject[] +PsiReferenceExpression:myDescendants : Subject[] +PsiReferenceExpression:p : Subject[] +PsiReferenceExpression:p : Subject[] +PsiReferenceExpression:p : Subject[] + +Conversions: +myAncestors -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Lvalue/after/Type.java new file mode 100644 index 000000000000..5b667afd7284 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Lvalue/after/Type.java @@ -0,0 +1,15 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Ancestor[] myAncestors; + private Subject[] mySubjects; + private Subject[] myDescendants; + + public void meth(Subject[] p) { + myAncestors = p; + mySubjects = p; + myDescendants = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Lvalue/before/Type.java new file mode 100644 index 000000000000..6c0ad8e907ae --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Lvalue/before/Type.java @@ -0,0 +1,15 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Ancestor[] myAncestors; + private Subject[] mySubjects; + private Descendant[] myDescendants; + + public void meth(Descendant[] p) { + myAncestors = p; + mySubjects = p; + myDescendants = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Rvalue/after/Type.items new file mode 100644 index 000000000000..aa0545cd97f1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Rvalue/after/Type.items @@ -0,0 +1,13 @@ +Types: +PsiField:myField : Subject[][] +PsiParameter:pa : Subject[][] +PsiReferenceExpression:myField : Subject[][] +PsiReferenceExpression:myField : Subject[][] +PsiReferenceExpression:myField : Subject[][] +PsiReferenceExpression:pa : Subject[][] + +Conversions: +pd -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Rvalue/after/Type.java new file mode 100644 index 000000000000..1dc9d19b69d7 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Rvalue/after/Type.java @@ -0,0 +1,12 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Subject[][] myField; + public void meth(Subject[][] pa, Subject[][] ps, Descendant[][] pd) { + myField = pa; + myField = ps; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Rvalue/before/Type.java new file mode 100644 index 000000000000..b84f5fada9b6 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayReftype2Rvalue/before/Type.java @@ -0,0 +1,12 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Ancestor[][] myField; + public void meth(Ancestor[][] pa, Subject[][] ps, Descendant[][] pd) { + myField = pa; + myField = ps; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayRoots2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayRoots2Lvalue/after/Type.items new file mode 100644 index 000000000000..bfcf79449245 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayRoots2Lvalue/after/Type.items @@ -0,0 +1,16 @@ +Types: +PsiField:myHolder : Holder[] +PsiParameter:p : Holder[] +PsiReferenceExpression:myHolder : Holder[] +PsiReferenceExpression:p : Holder[] +PsiReferenceExpression:p : Holder[] +PsiReferenceExpression:p : Holder[] +PsiReferenceExpression:p : Holder[] + +Conversions: +myCloneable -> $ +myObject -> $ +mySerializable -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayRoots2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayRoots2Lvalue/after/Type.java new file mode 100644 index 000000000000..ea67626d3e12 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayRoots2Lvalue/after/Type.java @@ -0,0 +1,15 @@ +class Holder implements Cloneable, java.io.Serializable {} + +class Type { + private Object myObject; + private Cloneable myCloneable; + private java.io.Serializable mySerializable; + private Holder[] myHolder; + + public void meth(Holder[] p) { + myObject = p; + myCloneable = p; + mySerializable = p; + myHolder = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayRoots2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayRoots2Lvalue/before/Type.java new file mode 100644 index 000000000000..41bb17f7fec2 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayRoots2Lvalue/before/Type.java @@ -0,0 +1,15 @@ +class Holder implements Cloneable, java.io.Serializable {} + +class Type { + private Object myObject; + private Cloneable myCloneable; + private java.io.Serializable mySerializable; + private Holder myHolder; + + public void meth(Holder p) { + myObject = p; + myCloneable = p; + mySerializable = p; + myHolder = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2Lvalue/after/Type.items new file mode 100644 index 000000000000..9bcbf6e3ccf2 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2Lvalue/after/Type.items @@ -0,0 +1,13 @@ +Types: +PsiField:myDescendants : Subject[] +PsiParameter:p : Subject... +PsiReferenceExpression:myDescendants : Subject[] +PsiReferenceExpression:p : Subject[] +PsiReferenceExpression:p : Subject[] +PsiReferenceExpression:p : Subject[] + +Conversions: +myAncestors -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2Lvalue/after/Type.java new file mode 100644 index 000000000000..82714edc14eb --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2Lvalue/after/Type.java @@ -0,0 +1,15 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Ancestor[] myAncestors; + private Subject[] mySubjects; + private Subject[] myDescendants; + + public void meth(Subject... p) { + myAncestors = p; + mySubjects = p; + myDescendants = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2Lvalue/before/Type.java new file mode 100644 index 000000000000..6c0ad8e907ae --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2Lvalue/before/Type.java @@ -0,0 +1,15 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Ancestor[] myAncestors; + private Subject[] mySubjects; + private Descendant[] myDescendants; + + public void meth(Descendant[] p) { + myAncestors = p; + mySubjects = p; + myDescendants = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvalueNeg/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvalueNeg/after/Type.items new file mode 100644 index 000000000000..8e16567f6b52 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvalueNeg/after/Type.items @@ -0,0 +1,10 @@ +Types: +PsiField:myField : Descendant[] +PsiParameter:p : Descendant[] +PsiReferenceExpression:myField : Descendant[] +PsiReferenceExpression:p : Descendant[] + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvalueNeg/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvalueNeg/after/Type.java new file mode 100644 index 000000000000..b14ffa0b66b9 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvalueNeg/after/Type.java @@ -0,0 +1,10 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Descendant[] myField; + public void meth(Descendant[] p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvalueNeg/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvalueNeg/before/Type.java new file mode 100644 index 000000000000..299d07095294 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvalueNeg/before/Type.java @@ -0,0 +1,10 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Ancestor[] myField; + public void meth(Subject... p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvaluePos/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvaluePos/after/Type.items new file mode 100644 index 000000000000..fa58313766a2 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvaluePos/after/Type.items @@ -0,0 +1,8 @@ +Types: +PsiField:myField : Subject[] +PsiReferenceExpression:myField : Subject[] + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvaluePos/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvaluePos/after/Type.java new file mode 100644 index 000000000000..b17f19ce9366 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvaluePos/after/Type.java @@ -0,0 +1,10 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Subject[] myField; + public void meth(Subject... p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvaluePos/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvaluePos/before/Type.java new file mode 100644 index 000000000000..299d07095294 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeArrayVararg2RvaluePos/before/Type.java @@ -0,0 +1,10 @@ +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Ancestor[] myField; + public void meth(Subject... p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Lvalue/after/Type.items new file mode 100644 index 000000000000..d2a5bdf18da5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Lvalue/after/Type.items @@ -0,0 +1,11 @@ +Types: +PsiParameter:p : java.lang.Boolean +PsiReferenceExpression:p : java.lang.Boolean +PsiReferenceExpression:p : java.lang.Boolean + +Conversions: +myField -> $ +myFieldSuper3 -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Lvalue/after/Type.java new file mode 100644 index 000000000000..256ad8ae87ba --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Lvalue/after/Type.java @@ -0,0 +1,8 @@ +class Type { + private boolean myField; + private Object myFieldSuper3; + public void meth(Boolean p) { + myField = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Lvalue/before/Type.java new file mode 100644 index 000000000000..e27196d88750 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Lvalue/before/Type.java @@ -0,0 +1,8 @@ +class Type { + private boolean myField; + private Object myFieldSuper3; + public void meth(boolean p) { + myField = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Rvalue/after/Type.items new file mode 100644 index 000000000000..ddbe17fb4ffc --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Rvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : boolean +PsiReferenceExpression:myField : boolean + +Conversions: +p -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Rvalue/after/Type.java new file mode 100644 index 000000000000..d58f3df69336 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Rvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private boolean myField; + public void meth(Boolean p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Rvalue/before/Type.java new file mode 100644 index 000000000000..fcfe89fe9eca --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxBoolean2Rvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private Boolean myField; + public void meth(Boolean p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Lvalue/after/Type.items new file mode 100644 index 000000000000..1c80a5546782 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Lvalue/after/Type.items @@ -0,0 +1,15 @@ +Types: +PsiParameter:p : java.lang.Byte +PsiReferenceExpression:p : java.lang.Byte +PsiReferenceExpression:p : java.lang.Byte +PsiReferenceExpression:p : java.lang.Byte +PsiReferenceExpression:p : java.lang.Byte + +Conversions: +myField -> $ +myFieldSuper1 -> $ +myFieldSuper2 -> $ +myFieldSuper3 -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Lvalue/after/Type.java new file mode 100644 index 000000000000..40e19f5b4a68 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Lvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private byte myField; + private short myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(Byte p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Lvalue/before/Type.java new file mode 100644 index 000000000000..c525d82e6f19 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Lvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private byte myField; + private short myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(byte p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Rvalue/after/Type.items new file mode 100644 index 000000000000..192b82591e68 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Rvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : byte +PsiReferenceExpression:myField : byte + +Conversions: +p -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Rvalue/after/Type.java new file mode 100644 index 000000000000..435b929c8591 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Rvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private byte myField; + public void meth(Byte p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Rvalue/before/Type.java new file mode 100644 index 000000000000..c0c7993580df --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxByte2Rvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private Byte myField; + public void meth(Byte p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Lvalue/after/Type.items new file mode 100644 index 000000000000..3499c81915b3 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Lvalue/after/Type.items @@ -0,0 +1,13 @@ +Types: +PsiParameter:p : java.lang.Character +PsiReferenceExpression:p : java.lang.Character +PsiReferenceExpression:p : java.lang.Character +PsiReferenceExpression:p : java.lang.Character + +Conversions: +myField -> $ +myFieldSuper1 -> $ +myFieldSuper3 -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Lvalue/after/Type.java new file mode 100644 index 000000000000..c075b5ea1ae1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Lvalue/after/Type.java @@ -0,0 +1,10 @@ +class Type { + private char myField; + private int myFieldSuper1; + private Object myFieldSuper3; + public void meth(Character p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Lvalue/before/Type.java new file mode 100644 index 000000000000..c821e8a38b8e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Lvalue/before/Type.java @@ -0,0 +1,10 @@ +class Type { + private char myField; + private int myFieldSuper1; + private Object myFieldSuper3; + public void meth(char p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Rvalue/after/Type.items new file mode 100644 index 000000000000..8f1b31f74f05 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Rvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : char +PsiReferenceExpression:myField : char + +Conversions: +p -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Rvalue/after/Type.java new file mode 100644 index 000000000000..bec7b611e95a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Rvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private char myField; + public void meth(Character p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Rvalue/before/Type.java new file mode 100644 index 000000000000..a98d2a5fa05a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxChar2Rvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private Character myField; + public void meth(Character p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Lvalue/after/Type.items new file mode 100644 index 000000000000..c961b407f293 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Lvalue/after/Type.items @@ -0,0 +1,13 @@ +Types: +PsiParameter:p : java.lang.Double +PsiReferenceExpression:p : java.lang.Double +PsiReferenceExpression:p : java.lang.Double +PsiReferenceExpression:p : java.lang.Double + +Conversions: +myField -> $ +myFieldSuper2 -> $ +myFieldSuper3 -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Lvalue/after/Type.java new file mode 100644 index 000000000000..c2cc8485f4f5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Lvalue/after/Type.java @@ -0,0 +1,10 @@ +class Type { + private double myField; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(Double p) { + myField = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Lvalue/before/Type.java new file mode 100644 index 000000000000..56ec2d53eb99 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Lvalue/before/Type.java @@ -0,0 +1,10 @@ +class Type { + private double myField; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(double p) { + myField = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Rvalue/after/Type.items new file mode 100644 index 000000000000..2c80921ecfcb --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Rvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : double +PsiReferenceExpression:myField : double + +Conversions: +p -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Rvalue/after/Type.java new file mode 100644 index 000000000000..ac0e3c68ebdb --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Rvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private double myField; + public void meth(Double p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Rvalue/before/Type.java new file mode 100644 index 000000000000..4950dcb0d5bd --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxDouble2Rvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private Double myField; + public void meth(Double p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Lvalue/after/Type.items new file mode 100644 index 000000000000..d51dd6bd244e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Lvalue/after/Type.items @@ -0,0 +1,15 @@ +Types: +PsiParameter:p : java.lang.Float +PsiReferenceExpression:p : java.lang.Float +PsiReferenceExpression:p : java.lang.Float +PsiReferenceExpression:p : java.lang.Float +PsiReferenceExpression:p : java.lang.Float + +Conversions: +myField -> $ +myFieldSuper1 -> $ +myFieldSuper2 -> $ +myFieldSuper3 -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Lvalue/after/Type.java new file mode 100644 index 000000000000..4e06d3369857 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Lvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private float myField; + private double myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(Float p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Lvalue/before/Type.java new file mode 100644 index 000000000000..24ec9a945603 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Lvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private float myField; + private double myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(float p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Rvalue/after/Type.items new file mode 100644 index 000000000000..1b905928d822 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Rvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : float +PsiReferenceExpression:myField : float + +Conversions: +p -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Rvalue/after/Type.java new file mode 100644 index 000000000000..1db8edb10bed --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Rvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private float myField; + public void meth(Float p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Rvalue/before/Type.java new file mode 100644 index 000000000000..078b103e8df1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxFloat2Rvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private Float myField; + public void meth(Float p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Lvalue/after/Type.items new file mode 100644 index 000000000000..24c52d5796ed --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Lvalue/after/Type.items @@ -0,0 +1,15 @@ +Types: +PsiParameter:p : java.lang.Integer +PsiReferenceExpression:p : java.lang.Integer +PsiReferenceExpression:p : java.lang.Integer +PsiReferenceExpression:p : java.lang.Integer +PsiReferenceExpression:p : java.lang.Integer + +Conversions: +myField -> $ +myFieldSuper1 -> $ +myFieldSuper2 -> $ +myFieldSuper3 -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Lvalue/after/Type.java new file mode 100644 index 000000000000..e0075f597b24 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Lvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private int myField; + private long myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(Integer p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Lvalue/before/Type.java new file mode 100644 index 000000000000..9c2f74c3f26f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Lvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private int myField; + private long myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(int p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Rvalue/after/Type.items new file mode 100644 index 000000000000..d95e0af0768c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Rvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : int +PsiReferenceExpression:myField : int + +Conversions: +p -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Rvalue/after/Type.java new file mode 100644 index 000000000000..4bf28b31788c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Rvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private int myField; + public void meth(Integer p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Rvalue/before/Type.java new file mode 100644 index 000000000000..87273262b496 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxInt2Rvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private Integer myField; + public void meth(Integer p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Lvalue/after/Type.items new file mode 100644 index 000000000000..29939f335f62 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Lvalue/after/Type.items @@ -0,0 +1,15 @@ +Types: +PsiParameter:p : java.lang.Long +PsiReferenceExpression:p : java.lang.Long +PsiReferenceExpression:p : java.lang.Long +PsiReferenceExpression:p : java.lang.Long +PsiReferenceExpression:p : java.lang.Long + +Conversions: +myField -> $ +myFieldSuper1 -> $ +myFieldSuper2 -> $ +myFieldSuper3 -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Lvalue/after/Type.java new file mode 100644 index 000000000000..695801b1bc4f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Lvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private long myField; + private float myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(Long p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Lvalue/before/Type.java new file mode 100644 index 000000000000..c6a909f7c46a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Lvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private long myField; + private float myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(long p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Rvalue/after/Type.items new file mode 100644 index 000000000000..0fa3e3feb520 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Rvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : long +PsiReferenceExpression:myField : long + +Conversions: +p -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Rvalue/after/Type.java new file mode 100644 index 000000000000..6f407a2591a1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Rvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private long myField; + public void meth(Long p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Rvalue/before/Type.java new file mode 100644 index 000000000000..ceceb07caa8e --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxLong2Rvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private Long myField; + public void meth(Long p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Lvalue/after/Type.items new file mode 100644 index 000000000000..c6a4cc9b70c8 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Lvalue/after/Type.items @@ -0,0 +1,15 @@ +Types: +PsiParameter:p : java.lang.Short +PsiReferenceExpression:p : java.lang.Short +PsiReferenceExpression:p : java.lang.Short +PsiReferenceExpression:p : java.lang.Short +PsiReferenceExpression:p : java.lang.Short + +Conversions: +myField -> $ +myFieldSuper1 -> $ +myFieldSuper2 -> $ +myFieldSuper3 -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Lvalue/after/Type.java new file mode 100644 index 000000000000..50d61183a785 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Lvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private short myField; + private int myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(Short p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Lvalue/before/Type.java new file mode 100644 index 000000000000..52eb7aa5b30c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Lvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private short myField; + private int myFieldSuper1; + private Number myFieldSuper2; + private Object myFieldSuper3; + public void meth(short p) { + myField = p; + myFieldSuper1 = p; + myFieldSuper2 = p; + myFieldSuper3 = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Rvalue/after/Type.items new file mode 100644 index 000000000000..28ba15701be6 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Rvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : short +PsiReferenceExpression:myField : short + +Conversions: +p -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Rvalue/after/Type.java new file mode 100644 index 000000000000..ba146982c723 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Rvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private short myField; + public void meth(Short p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Rvalue/before/Type.java new file mode 100644 index 000000000000..9ca0f4947260 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeAutoboxShort2Rvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private Short myField; + public void meth(Short p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestor2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestor2Lvalue/after/Type.items new file mode 100644 index 000000000000..6106a705cdd8 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestor2Lvalue/after/Type.items @@ -0,0 +1,33 @@ +Types: +PsiField:myAncestorSupers : java.util.Set<Subject> +PsiField:myAncestors : java.util.Set<Subject> +PsiField:myCollection : java.util.Collection<Subject> +PsiField:myDescendantExtends : java.util.Set<Subject> +PsiField:myDescendants : java.util.Set<Subject> +PsiParameter:p : java.util.Set<Subject> +PsiReferenceExpression:myAncestorSupers : java.util.Set<Subject> +PsiReferenceExpression:myAncestors : java.util.Set<Subject> +PsiReferenceExpression:myCollection : java.util.Collection<Subject> +PsiReferenceExpression:myDescendantExtends : java.util.Set<Subject> +PsiReferenceExpression:myDescendants : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> +PsiReferenceExpression:p : java.util.Set<Subject> + +Conversions: +myAncestorExtends -> $ +myDescendantSupers -> $ +mySet -> $ +mySubjectExtends -> $ +mySubjectSupers -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestor2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestor2Lvalue/after/Type.java new file mode 100644 index 000000000000..7e3eeb9770ca --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestor2Lvalue/after/Type.java @@ -0,0 +1,40 @@ +import java.util.Collection; +import java.util.Set; + +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Set<Subject> myAncestors; + private Set<? extends Ancestor> myAncestorExtends; + private Set<Subject> myAncestorSupers; + + private Set<Subject> mySubjects; + private Set<? extends Subject> mySubjectExtends; + private Set<? super Subject> mySubjectSupers; + + private Set<Subject> myDescendants; + private Set<Subject> myDescendantExtends; + private Set<? super Descendant> myDescendantSupers; + + private Set mySet; + private Collection<Subject> myCollection; + + public void meth(Set<Subject> p) { + myAncestors = p; + myAncestorExtends = p; + myAncestorSupers = p; + + mySubjects = p; + mySubjectExtends = p; + mySubjectSupers = p; + + myDescendants = p; + myDescendantExtends = p; + myDescendantSupers = p; + + mySet = p; + myCollection = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestor2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestor2Lvalue/before/Type.java new file mode 100644 index 000000000000..2e63240580ca --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestor2Lvalue/before/Type.java @@ -0,0 +1,40 @@ +import java.util.Collection; +import java.util.Set; + +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Set<Ancestor> myAncestors; + private Set<? extends Ancestor> myAncestorExtends; + private Set<? super Ancestor> myAncestorSupers; + + private Set<Subject> mySubjects; + private Set<? extends Subject> mySubjectExtends; + private Set<? super Subject> mySubjectSupers; + + private Set<Descendant> myDescendants; + private Set<? extends Descendant> myDescendantExtends; + private Set<? super Descendant> myDescendantSupers; + + private Set mySet; + private Collection<Ancestor> myCollection; + + public void meth(Set p) { + myAncestors = p; + myAncestorExtends = p; + myAncestorSupers = p; + + mySubjects = p; + mySubjectExtends = p; + mySubjectSupers = p; + + myDescendants = p; + myDescendantExtends = p; + myDescendantSupers = p; + + mySet = p; + myCollection = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestorWildcard2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestorWildcard2Lvalue/after/Type.items new file mode 100644 index 000000000000..6cb2f2be0d34 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestorWildcard2Lvalue/after/Type.items @@ -0,0 +1,33 @@ +Types: +PsiField:myAncestorSupers : java.util.Set<? extends Subject> +PsiField:myAncestors : java.util.Set<? extends Subject> +PsiField:myDescendantExtends : java.util.Set<? extends Subject> +PsiField:myDescendantSupers : java.util.Set<? extends Subject> +PsiField:myDescendants : java.util.Set<? extends Subject> +PsiField:mySubjectSupers : java.util.Set<? extends Subject> +PsiField:mySubjects : java.util.Set<? extends Subject> +PsiParameter:p : java.util.Set<? extends Subject> +PsiReferenceExpression:myAncestorSupers : java.util.Set<? extends Subject> +PsiReferenceExpression:myAncestors : java.util.Set<? extends Subject> +PsiReferenceExpression:myDescendantExtends : java.util.Set<? extends Subject> +PsiReferenceExpression:myDescendantSupers : java.util.Set<? extends Subject> +PsiReferenceExpression:myDescendants : java.util.Set<? extends Subject> +PsiReferenceExpression:mySubjectSupers : java.util.Set<? extends Subject> +PsiReferenceExpression:mySubjects : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> +PsiReferenceExpression:p : java.util.Set<? extends Subject> + +Conversions: +myAncestorExtends -> $ +mySet -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestorWildcard2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestorWildcard2Lvalue/after/Type.java new file mode 100644 index 000000000000..2ffef9b4e9ad --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestorWildcard2Lvalue/after/Type.java @@ -0,0 +1,37 @@ +import java.util.Set; + +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Set<? extends Subject> myAncestors; + private Set<? extends Ancestor> myAncestorExtends; + private Set<? extends Subject> myAncestorSupers; + + private Set<? extends Subject> mySubjects; + private Set<? extends Subject> mySubjectExtends; + private Set<? extends Subject> mySubjectSupers; + + private Set<? extends Subject> myDescendants; + private Set<? extends Subject> myDescendantExtends; + private Set<? extends Subject> myDescendantSupers; + + private Set mySet; + + public void meth(Set<? extends Subject> p) { + myAncestors = p; + myAncestorExtends = p; + myAncestorSupers = p; + + mySubjects = p; + mySubjectExtends = p; + mySubjectSupers = p; + + myDescendants = p; + myDescendantExtends = p; + myDescendantSupers = p; + + mySet = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestorWildcard2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestorWildcard2Lvalue/before/Type.java new file mode 100644 index 000000000000..4fc8d5baf167 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenAncestorWildcard2Lvalue/before/Type.java @@ -0,0 +1,37 @@ +import java.util.Set; + +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Set<Ancestor> myAncestors; + private Set<? extends Ancestor> myAncestorExtends; + private Set<? super Ancestor> myAncestorSupers; + + private Set<Subject> mySubjects; + private Set<? extends Subject> mySubjectExtends; + private Set<? super Subject> mySubjectSupers; + + private Set<Descendant> myDescendants; + private Set<? extends Descendant> myDescendantExtends; + private Set<? super Descendant> myDescendantSupers; + + private Set mySet; + + public void meth(Set p) { + myAncestors = p; + myAncestorExtends = p; + myAncestorSupers = p; + + mySubjects = p; + mySubjectExtends = p; + mySubjectSupers = p; + + myDescendants = p; + myDescendantExtends = p; + myDescendantSupers = p; + + mySet = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendant2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendant2Rvalue/after/Type.items new file mode 100644 index 000000000000..ab6a62095446 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendant2Rvalue/after/Type.items @@ -0,0 +1,37 @@ +Types: +PsiField:myField : java.util.Set<Subject> +PsiLocalVariable:ancestorExtends : java.util.Set<Subject> +PsiLocalVariable:ancestorSupers : java.util.Set<Subject> +PsiLocalVariable:ancestors : java.util.Set<Subject> +PsiLocalVariable:descendantExtends : java.util.Set<Subject> +PsiLocalVariable:descendantSupers : java.util.Set<Subject> +PsiLocalVariable:descendants : java.util.Set<Subject> +PsiLocalVariable:myCollection : java.util.AbstractSet<Subject> +PsiLocalVariable:subjectExtends : java.util.Set<Subject> +PsiLocalVariable:subjectSupers : java.util.Set<Subject> +PsiReferenceExpression:ancestorExtends : java.util.Set<Subject> +PsiReferenceExpression:ancestorSupers : java.util.Set<Subject> +PsiReferenceExpression:ancestors : java.util.Set<Subject> +PsiReferenceExpression:descendantExtends : java.util.Set<Subject> +PsiReferenceExpression:descendantSupers : java.util.Set<Subject> +PsiReferenceExpression:descendants : java.util.Set<Subject> +PsiReferenceExpression:myCollection : java.util.AbstractSet<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:myField : java.util.Set<Subject> +PsiReferenceExpression:subjectExtends : java.util.Set<Subject> +PsiReferenceExpression:subjectSupers : java.util.Set<Subject> + +Conversions: +set -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendant2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendant2Rvalue/after/Type.java new file mode 100644 index 000000000000..119e65ca61b5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendant2Rvalue/after/Type.java @@ -0,0 +1,39 @@ +import java.util.AbstractSet; +import java.util.Set; + +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Set<Subject> myField; + + public void meth() { + Set<Subject> ancestors = null; + myField = ancestors; + Set<Subject> ancestorExtends = null; + myField = ancestorExtends; + Set<Subject> ancestorSupers = null; + myField = ancestorSupers; + + // turning everything into Set<Subject> is actually too strict, but correct + Set<Subject> subjects = null; + myField = subjects; + Set<Subject> subjectExtends = null; + myField = subjectExtends; + Set<Subject> subjectSupers = null; + myField = subjectSupers; + + Set<Subject> descendants = null; + myField = descendants; + Set<Subject> descendantExtends = null; + myField = descendantExtends; + Set<Subject> descendantSupers = null; + myField = descendantSupers; + + Set set = null; + myField = set; + AbstractSet<Subject> myCollection = null; + myField = myCollection; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendant2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendant2Rvalue/before/Type.java new file mode 100644 index 000000000000..e53aa1d3cd1b --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendant2Rvalue/before/Type.java @@ -0,0 +1,39 @@ +import java.util.AbstractSet; +import java.util.Set; + +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Set myField; + + public void meth() { + Set<Ancestor> ancestors = null; + myField = ancestors; + Set<? extends Ancestor> ancestorExtends = null; + myField = ancestorExtends; + Set<? super Ancestor> ancestorSupers = null; + myField = ancestorSupers; + + // turning everything into Set<Subject> is actually too strict, but correct + Set<Subject> subjects = null; + myField = subjects; + Set<? extends Subject> subjectExtends = null; + myField = subjectExtends; + Set<? super Subject> subjectSupers = null; + myField = subjectSupers; + + Set<Descendant> descendants = null; + myField = descendants; + Set<? extends Descendant> descendantExtends = null; + myField = descendantExtends; + Set<? super Descendant> descendantSupers = null; + myField = descendantSupers; + + Set set = null; + myField = set; + AbstractSet<Descendant> myCollection = null; + myField = myCollection; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendantWildcard2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendantWildcard2Rvalue/after/Type.items new file mode 100644 index 000000000000..e34aedf887d3 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendantWildcard2Rvalue/after/Type.items @@ -0,0 +1,32 @@ +Types: +PsiField:myField : java.util.Set<? super Subject> +PsiLocalVariable:ancestorExtends : java.util.Set<? super Subject> +PsiLocalVariable:descendantExtends : java.util.Set<? super Subject> +PsiLocalVariable:descendantSupers : java.util.Set<? super Subject> +PsiLocalVariable:descendants : java.util.Set<? super Subject> +PsiLocalVariable:subjectExtends : java.util.Set<? super Subject> +PsiReferenceExpression:ancestorExtends : java.util.Set<? super Subject> +PsiReferenceExpression:descendantExtends : java.util.Set<? super Subject> +PsiReferenceExpression:descendantSupers : java.util.Set<? super Subject> +PsiReferenceExpression:descendants : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:myField : java.util.Set<? super Subject> +PsiReferenceExpression:subjectExtends : java.util.Set<? super Subject> + +Conversions: +ancestorSupers -> $ +ancestors -> $ +set -> $ +subjectSupers -> $ +subjects -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendantWildcard2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendantWildcard2Rvalue/after/Type.java new file mode 100644 index 000000000000..a0982c89aa5c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendantWildcard2Rvalue/after/Type.java @@ -0,0 +1,35 @@ +import java.util.Set; + +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Set<? super Subject> myField; + + public void meth() { + Set<Ancestor> ancestors = null; + myField = ancestors; + Set<? super Subject> ancestorExtends = null; + myField = ancestorExtends; + Set<? super Ancestor> ancestorSupers = null; + myField = ancestorSupers; + + Set<Subject> subjects = null; + myField = subjects; + Set<? super Subject> subjectExtends = null; + myField = subjectExtends; + Set<? super Subject> subjectSupers = null; + myField = subjectSupers; + + Set<? super Subject> descendants = null; + myField = descendants; + Set<? super Subject> descendantExtends = null; + myField = descendantExtends; + Set<? super Subject> descendantSupers = null; + myField = descendantSupers; + + Set set = null; + myField = set; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendantWildcard2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendantWildcard2Rvalue/before/Type.java new file mode 100644 index 000000000000..79f4d219b47c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenDescendantWildcard2Rvalue/before/Type.java @@ -0,0 +1,35 @@ +import java.util.Set; + +interface Ancestor {} +interface Subject extends Ancestor {} +class Descendant implements Subject {} + +class Type { + private Set myField; + + public void meth() { + Set<Ancestor> ancestors = null; + myField = ancestors; + Set<? extends Ancestor> ancestorExtends = null; + myField = ancestorExtends; + Set<? super Ancestor> ancestorSupers = null; + myField = ancestorSupers; + + Set<Subject> subjects = null; + myField = subjects; + Set<? extends Subject> subjectExtends = null; + myField = subjectExtends; + Set<? super Subject> subjectSupers = null; + myField = subjectSupers; + + Set<Descendant> descendants = null; + myField = descendants; + Set<? extends Descendant> descendantExtends = null; + myField = descendantExtends; + Set<? super Descendant> descendantSupers = null; + myField = descendantSupers; + + Set set = null; + myField = set; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Lvalue/after/Type.items new file mode 100644 index 000000000000..9da02a3b248c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Lvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiParameter:p : java.util.Set +PsiReferenceExpression:p : java.util.Set + +Conversions: +myField -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Lvalue/after/Type.java new file mode 100644 index 000000000000..f66a7c1fadc0 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Lvalue/after/Type.java @@ -0,0 +1,10 @@ +import java.util.Set; + +class Any {} + +class Type { + private Set<Any> myField; + public void meth(Set p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Lvalue/before/Type.java new file mode 100644 index 000000000000..968d7e85e0b7 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Lvalue/before/Type.java @@ -0,0 +1,10 @@ +import java.util.Set; + +class Any {} + +class Type { + private Set<Any> myField; + public void meth(Set<Any> p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Rvalue/after/Type.items new file mode 100644 index 000000000000..a3dd46449c57 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Rvalue/after/Type.items @@ -0,0 +1,9 @@ +Types: +PsiField:myField : java.util.Set +PsiReferenceExpression:myField : java.util.Set + +Conversions: +p -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Rvalue/after/Type.java new file mode 100644 index 000000000000..f78a0b3d5a68 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Rvalue/after/Type.java @@ -0,0 +1,10 @@ +import java.util.Set; + +class Any {} + +class Type { + private Set myField; + public void meth(Set<Any> p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Rvalue/before/Type.java new file mode 100644 index 000000000000..968d7e85e0b7 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeGenRaw2Rvalue/before/Type.java @@ -0,0 +1,10 @@ +import java.util.Set; + +class Any {} + +class Type { + private Set<Any> myField; + public void meth(Set<Any> p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Lvalue/after/Type.items new file mode 100644 index 000000000000..361d3837f2da --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Lvalue/after/Type.items @@ -0,0 +1,10 @@ +Types: +PsiField:myField : boolean +PsiParameter:p : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:p : boolean + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Lvalue/after/Type.java new file mode 100644 index 000000000000..8a5b062df2e6 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Lvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private boolean myField; + public void meth(boolean p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Lvalue/before/Type.java new file mode 100644 index 000000000000..b9185a0c81ed --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Lvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private int myField; + public void meth(int p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Rvalue/after/Type.items new file mode 100644 index 000000000000..361d3837f2da --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Rvalue/after/Type.items @@ -0,0 +1,10 @@ +Types: +PsiField:myField : boolean +PsiParameter:p : boolean +PsiReferenceExpression:myField : boolean +PsiReferenceExpression:p : boolean + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Rvalue/after/Type.java new file mode 100644 index 000000000000..8a5b062df2e6 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Rvalue/after/Type.java @@ -0,0 +1,6 @@ +class Type { + private boolean myField; + public void meth(boolean p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Rvalue/before/Type.java new file mode 100644 index 000000000000..b9185a0c81ed --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubBoolean2Rvalue/before/Type.java @@ -0,0 +1,6 @@ +class Type { + private int myField; + public void meth(int p) { + myField = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubByte2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubByte2Rvalue/after/Type.items new file mode 100644 index 000000000000..71e76cc5a1e9 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubByte2Rvalue/after/Type.items @@ -0,0 +1,26 @@ +Types: +PsiField:myField : byte +PsiParameter:pc : byte +PsiParameter:pd : byte +PsiParameter:pf : byte +PsiParameter:pi : byte +PsiParameter:pl : byte +PsiParameter:ps : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:myField : byte +PsiReferenceExpression:pc : byte +PsiReferenceExpression:pd : byte +PsiReferenceExpression:pf : byte +PsiReferenceExpression:pi : byte +PsiReferenceExpression:pl : byte +PsiReferenceExpression:ps : byte + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubByte2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubByte2Rvalue/after/Type.java new file mode 100644 index 000000000000..ac3a40879f5b --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubByte2Rvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private byte myField; + public void meth(byte pb, byte ps, byte pc, byte pi, byte pl, byte pf, byte pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubByte2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubByte2Rvalue/before/Type.java new file mode 100644 index 000000000000..f7edce2eea98 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubByte2Rvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private double myField; + public void meth(byte pb, short ps, char pc, int pi, long pl, float pf, double pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Lvalue/after/Type.items new file mode 100644 index 000000000000..521321c601c1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Lvalue/after/Type.items @@ -0,0 +1,22 @@ +Types: +PsiField:myByte : char +PsiField:myShort : char +PsiParameter:p : char +PsiReferenceExpression:myByte : char +PsiReferenceExpression:myShort : char +PsiReferenceExpression:p : char +PsiReferenceExpression:p : char +PsiReferenceExpression:p : char +PsiReferenceExpression:p : char +PsiReferenceExpression:p : char +PsiReferenceExpression:p : char +PsiReferenceExpression:p : char + +Conversions: +myDouble -> $ +myFloat -> $ +myInt -> $ +myLong -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Lvalue/after/Type.java new file mode 100644 index 000000000000..8b94e45d5626 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Lvalue/after/Type.java @@ -0,0 +1,18 @@ +class Type { + private char myByte; + private char myShort; + private char myChar; + private int myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(char p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Lvalue/before/Type.java new file mode 100644 index 000000000000..2d55ceaa511a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Lvalue/before/Type.java @@ -0,0 +1,18 @@ +class Type { + private byte myByte; + private short myShort; + private char myChar; + private int myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(byte p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Rvalue/after/Type.items new file mode 100644 index 000000000000..404f84f33867 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Rvalue/after/Type.items @@ -0,0 +1,26 @@ +Types: +PsiField:myField : char +PsiParameter:pb : char +PsiParameter:pd : char +PsiParameter:pf : char +PsiParameter:pi : char +PsiParameter:pl : char +PsiParameter:ps : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:myField : char +PsiReferenceExpression:pb : char +PsiReferenceExpression:pd : char +PsiReferenceExpression:pf : char +PsiReferenceExpression:pi : char +PsiReferenceExpression:pl : char +PsiReferenceExpression:ps : char + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Rvalue/after/Type.java new file mode 100644 index 000000000000..dc346a77074c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Rvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private char myField; + public void meth(char pb, char ps, char pc, char pi, char pl, char pf, char pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Rvalue/before/Type.java new file mode 100644 index 000000000000..f7edce2eea98 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubChar2Rvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private double myField; + public void meth(byte pb, short ps, char pc, int pi, long pl, float pf, double pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubDouble2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubDouble2Lvalue/after/Type.items new file mode 100644 index 000000000000..6946fcefbac0 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubDouble2Lvalue/after/Type.items @@ -0,0 +1,26 @@ +Types: +PsiField:myByte : double +PsiField:myChar : double +PsiField:myFloat : double +PsiField:myInt : double +PsiField:myLong : double +PsiField:myShort : double +PsiParameter:p : double +PsiReferenceExpression:myByte : double +PsiReferenceExpression:myChar : double +PsiReferenceExpression:myFloat : double +PsiReferenceExpression:myInt : double +PsiReferenceExpression:myLong : double +PsiReferenceExpression:myShort : double +PsiReferenceExpression:p : double +PsiReferenceExpression:p : double +PsiReferenceExpression:p : double +PsiReferenceExpression:p : double +PsiReferenceExpression:p : double +PsiReferenceExpression:p : double +PsiReferenceExpression:p : double + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubDouble2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubDouble2Lvalue/after/Type.java new file mode 100644 index 000000000000..8a5035c81e4d --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubDouble2Lvalue/after/Type.java @@ -0,0 +1,18 @@ +class Type { + private double myByte; + private double myShort; + private double myChar; + private double myInt; + private double myLong; + private double myFloat; + private double myDouble; + public void meth(double p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubDouble2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubDouble2Lvalue/before/Type.java new file mode 100644 index 000000000000..2d55ceaa511a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubDouble2Lvalue/before/Type.java @@ -0,0 +1,18 @@ +class Type { + private byte myByte; + private short myShort; + private char myChar; + private int myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(byte p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Lvalue/after/Type.items new file mode 100644 index 000000000000..c479836287e0 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Lvalue/after/Type.items @@ -0,0 +1,25 @@ +Types: +PsiField:myByte : float +PsiField:myChar : float +PsiField:myInt : float +PsiField:myLong : float +PsiField:myShort : float +PsiParameter:p : float +PsiReferenceExpression:myByte : float +PsiReferenceExpression:myChar : float +PsiReferenceExpression:myInt : float +PsiReferenceExpression:myLong : float +PsiReferenceExpression:myShort : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float +PsiReferenceExpression:p : float + +Conversions: +myDouble -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Lvalue/after/Type.java new file mode 100644 index 000000000000..8b59184de85f --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Lvalue/after/Type.java @@ -0,0 +1,18 @@ +class Type { + private float myByte; + private float myShort; + private float myChar; + private float myInt; + private float myLong; + private float myFloat; + private double myDouble; + public void meth(float p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Lvalue/before/Type.java new file mode 100644 index 000000000000..2d55ceaa511a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Lvalue/before/Type.java @@ -0,0 +1,18 @@ +class Type { + private byte myByte; + private short myShort; + private char myChar; + private int myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(byte p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Rvalue/after/Type.items new file mode 100644 index 000000000000..7a22f6771caf --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Rvalue/after/Type.items @@ -0,0 +1,21 @@ +Types: +PsiField:myField : float +PsiParameter:pd : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:myField : float +PsiReferenceExpression:pd : float + +Conversions: +pb -> $ +pc -> $ +pi -> $ +pl -> $ +ps -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Rvalue/after/Type.java new file mode 100644 index 000000000000..0b933cce77dd --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Rvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private float myField; + public void meth(byte pb, short ps, char pc, int pi, long pl, float pf, float pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Rvalue/before/Type.java new file mode 100644 index 000000000000..f7edce2eea98 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubFloat2Rvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private double myField; + public void meth(byte pb, short ps, char pc, int pi, long pl, float pf, double pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Lvalue/after/Type.items new file mode 100644 index 000000000000..200b3b8b3fb5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Lvalue/after/Type.items @@ -0,0 +1,23 @@ +Types: +PsiField:myByte : int +PsiField:myChar : int +PsiField:myShort : int +PsiParameter:p : int +PsiReferenceExpression:myByte : int +PsiReferenceExpression:myChar : int +PsiReferenceExpression:myShort : int +PsiReferenceExpression:p : int +PsiReferenceExpression:p : int +PsiReferenceExpression:p : int +PsiReferenceExpression:p : int +PsiReferenceExpression:p : int +PsiReferenceExpression:p : int +PsiReferenceExpression:p : int + +Conversions: +myDouble -> $ +myFloat -> $ +myLong -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Lvalue/after/Type.java new file mode 100644 index 000000000000..b15830da724d --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Lvalue/after/Type.java @@ -0,0 +1,18 @@ +class Type { + private int myByte; + private int myShort; + private int myChar; + private int myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(int p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Lvalue/before/Type.java new file mode 100644 index 000000000000..2d55ceaa511a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Lvalue/before/Type.java @@ -0,0 +1,18 @@ +class Type { + private byte myByte; + private short myShort; + private char myChar; + private int myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(byte p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Rvalue/after/Type.items new file mode 100644 index 000000000000..b7c45d6a6aff --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Rvalue/after/Type.items @@ -0,0 +1,23 @@ +Types: +PsiField:myField : int +PsiParameter:pd : int +PsiParameter:pf : int +PsiParameter:pl : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:myField : int +PsiReferenceExpression:pd : int +PsiReferenceExpression:pf : int +PsiReferenceExpression:pl : int + +Conversions: +pb -> $ +pc -> $ +ps -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Rvalue/after/Type.java new file mode 100644 index 000000000000..c13b0ab9bee2 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Rvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private int myField; + public void meth(byte pb, short ps, char pc, int pi, int pl, int pf, int pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Rvalue/before/Type.java new file mode 100644 index 000000000000..f7edce2eea98 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubInt2Rvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private double myField; + public void meth(byte pb, short ps, char pc, int pi, long pl, float pf, double pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Lvalue/after/Type.items new file mode 100644 index 000000000000..3f94bd20c6e8 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Lvalue/after/Type.items @@ -0,0 +1,24 @@ +Types: +PsiField:myByte : long +PsiField:myChar : long +PsiField:myInt : long +PsiField:myShort : long +PsiParameter:p : long +PsiReferenceExpression:myByte : long +PsiReferenceExpression:myChar : long +PsiReferenceExpression:myInt : long +PsiReferenceExpression:myShort : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long +PsiReferenceExpression:p : long + +Conversions: +myDouble -> $ +myFloat -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Lvalue/after/Type.java new file mode 100644 index 000000000000..1b594666283c --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Lvalue/after/Type.java @@ -0,0 +1,18 @@ +class Type { + private long myByte; + private long myShort; + private long myChar; + private long myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(long p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Lvalue/before/Type.java new file mode 100644 index 000000000000..2d55ceaa511a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Lvalue/before/Type.java @@ -0,0 +1,18 @@ +class Type { + private byte myByte; + private short myShort; + private char myChar; + private int myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(byte p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Rvalue/after/Type.items new file mode 100644 index 000000000000..98a3c92987b9 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Rvalue/after/Type.items @@ -0,0 +1,22 @@ +Types: +PsiField:myField : long +PsiParameter:pd : long +PsiParameter:pf : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:myField : long +PsiReferenceExpression:pd : long +PsiReferenceExpression:pf : long + +Conversions: +pb -> $ +pc -> $ +pi -> $ +ps -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Rvalue/after/Type.java new file mode 100644 index 000000000000..e3e3b25d89b4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Rvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private long myField; + public void meth(byte pb, short ps, char pc, int pi, long pl, long pf, long pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Rvalue/before/Type.java new file mode 100644 index 000000000000..f7edce2eea98 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubLong2Rvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private double myField; + public void meth(byte pb, short ps, char pc, int pi, long pl, float pf, double pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Lvalue/after/Type.items new file mode 100644 index 000000000000..8f0cd52a3560 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Lvalue/after/Type.items @@ -0,0 +1,22 @@ +Types: +PsiField:myByte : short +PsiField:myChar : short +PsiParameter:p : short +PsiReferenceExpression:myByte : short +PsiReferenceExpression:myChar : short +PsiReferenceExpression:p : short +PsiReferenceExpression:p : short +PsiReferenceExpression:p : short +PsiReferenceExpression:p : short +PsiReferenceExpression:p : short +PsiReferenceExpression:p : short +PsiReferenceExpression:p : short + +Conversions: +myDouble -> $ +myFloat -> $ +myInt -> $ +myLong -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Lvalue/after/Type.java new file mode 100644 index 000000000000..ccbe23c4b4e2 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Lvalue/after/Type.java @@ -0,0 +1,18 @@ +class Type { + private short myByte; + private short myShort; + private short myChar; + private int myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(short p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Lvalue/before/Type.java new file mode 100644 index 000000000000..2d55ceaa511a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Lvalue/before/Type.java @@ -0,0 +1,18 @@ +class Type { + private byte myByte; + private short myShort; + private char myChar; + private int myInt; + private long myLong; + private float myFloat; + private double myDouble; + public void meth(byte p) { + myByte = p; + myShort = p; + myChar = p; + myInt = p; + myLong = p; + myFloat = p; + myDouble = p; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Rvalue/after/Type.items new file mode 100644 index 000000000000..754060e723ec --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Rvalue/after/Type.items @@ -0,0 +1,25 @@ +Types: +PsiField:myField : short +PsiParameter:pc : short +PsiParameter:pd : short +PsiParameter:pf : short +PsiParameter:pi : short +PsiParameter:pl : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:myField : short +PsiReferenceExpression:pc : short +PsiReferenceExpression:pd : short +PsiReferenceExpression:pf : short +PsiReferenceExpression:pi : short +PsiReferenceExpression:pl : short + +Conversions: +pb -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Rvalue/after/Type.java new file mode 100644 index 000000000000..eb53bcd49ebc --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Rvalue/after/Type.java @@ -0,0 +1,12 @@ +class Type { + private short myField; + public void meth(byte pb, short ps, short pc, short pi, short pl, short pf, short pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Rvalue/before/Type.java new file mode 100644 index 000000000000..f7edce2eea98 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typePrimsubShort2Rvalue/before/Type.java @@ -0,0 +1,12 @@ +class Type { + private double myField; + public void meth(byte pb, short ps, char pc, int pi, long pl, float pf, double pd) { + myField = pb; + myField = ps; + myField = pc; + myField = pi; + myField = pl; + myField = pf; + myField = pd; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassChild2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassChild2Rvalue/after/Type.items new file mode 100644 index 000000000000..78431b6e4a4a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassChild2Rvalue/after/Type.items @@ -0,0 +1,17 @@ +Types: +PsiField:myField : ClassChild +PsiParameter:pcp : ClassChild +PsiParameter:pfc : ClassChild +PsiParameter:pfp : ClassChild +PsiReferenceExpression:myField : ClassChild +PsiReferenceExpression:myField : ClassChild +PsiReferenceExpression:myField : ClassChild +PsiReferenceExpression:myField : ClassChild +PsiReferenceExpression:pcp : ClassChild +PsiReferenceExpression:pfc : ClassChild +PsiReferenceExpression:pfp : ClassChild + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassChild2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassChild2Rvalue/after/Type.java new file mode 100644 index 000000000000..f5d9434c07c4 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassChild2Rvalue/after/Type.java @@ -0,0 +1,14 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private ClassChild myField; + public void meth(ClassChild pcc, ClassChild pcp, ClassChild pfc, ClassChild pfp) { + myField = pcc; + myField = pcp; + myField = pfc; + myField = pfp; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassChild2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassChild2Rvalue/before/Type.java new file mode 100644 index 000000000000..e5cfab9f9af5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassChild2Rvalue/before/Type.java @@ -0,0 +1,14 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private FaceParent myField; + public void meth(ClassChild pcc, ClassParent pcp, FaceChild pfc, FaceParent pfp) { + myField = pcc; + myField = pcp; + myField = pfc; + myField = pfp; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Lvalue/after/Type.items new file mode 100644 index 000000000000..18fce6b3d6ec --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Lvalue/after/Type.items @@ -0,0 +1,15 @@ +Types: +PsiField:myClassChild : ClassParent +PsiParameter:p : ClassParent +PsiReferenceExpression:myClassChild : ClassParent +PsiReferenceExpression:p : ClassParent +PsiReferenceExpression:p : ClassParent +PsiReferenceExpression:p : ClassParent +PsiReferenceExpression:p : ClassParent + +Conversions: +myFaceChild -> $ +myFaceParent -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Lvalue/after/Type.java new file mode 100644 index 000000000000..8d7fee567890 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Lvalue/after/Type.java @@ -0,0 +1,18 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private ClassParent myClassChild; + private ClassParent myClassParent; + private FaceChild myFaceChild; + private FaceParent myFaceParent; + + public void meth(ClassParent p) { + myClassChild = p; + myClassParent = p; + myFaceChild = p; + myFaceParent = p; + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Lvalue/before/Type.java new file mode 100644 index 000000000000..074af076748d --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Lvalue/before/Type.java @@ -0,0 +1,18 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private ClassChild myClassChild; + private ClassParent myClassParent; + private FaceChild myFaceChild; + private FaceParent myFaceParent; + + public void meth(ClassChild p) { + myClassChild = p; + myClassParent = p; + myFaceChild = p; + myFaceParent = p; + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Rvalue/after/Type.items new file mode 100644 index 000000000000..4e7bfb9a5f9a --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Rvalue/after/Type.items @@ -0,0 +1,16 @@ +Types: +PsiField:myField : ClassParent +PsiParameter:pfc : ClassParent +PsiParameter:pfp : ClassParent +PsiReferenceExpression:myField : ClassParent +PsiReferenceExpression:myField : ClassParent +PsiReferenceExpression:myField : ClassParent +PsiReferenceExpression:myField : ClassParent +PsiReferenceExpression:pfc : ClassParent +PsiReferenceExpression:pfp : ClassParent + +Conversions: +pcc -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Rvalue/after/Type.java new file mode 100644 index 000000000000..9953f41083c5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Rvalue/after/Type.java @@ -0,0 +1,14 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private ClassParent myField; + public void meth(ClassChild pcc, ClassParent pcp, ClassParent pfc, ClassParent pfp) { + myField = pcc; + myField = pcp; + myField = pfc; + myField = pfp; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Rvalue/before/Type.java new file mode 100644 index 000000000000..e5cfab9f9af5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefClassParent2Rvalue/before/Type.java @@ -0,0 +1,14 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private FaceParent myField; + public void meth(ClassChild pcc, ClassParent pcp, FaceChild pfc, FaceParent pfp) { + myField = pcc; + myField = pcp; + myField = pfc; + myField = pfp; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Lvalue/after/Type.items new file mode 100644 index 000000000000..9dd227a952df --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Lvalue/after/Type.items @@ -0,0 +1,16 @@ +Types: +PsiField:myClassChild : FaceChild +PsiField:myClassParent : FaceChild +PsiParameter:p : FaceChild +PsiReferenceExpression:myClassChild : FaceChild +PsiReferenceExpression:myClassParent : FaceChild +PsiReferenceExpression:p : FaceChild +PsiReferenceExpression:p : FaceChild +PsiReferenceExpression:p : FaceChild +PsiReferenceExpression:p : FaceChild + +Conversions: +myFaceParent -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Lvalue/after/Type.java new file mode 100644 index 000000000000..f4b8de1d6028 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Lvalue/after/Type.java @@ -0,0 +1,18 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private FaceChild myClassChild; + private FaceChild myClassParent; + private FaceChild myFaceChild; + private FaceParent myFaceParent; + + public void meth(FaceChild p) { + myClassChild = p; + myClassParent = p; + myFaceChild = p; + myFaceParent = p; + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Lvalue/before/Type.java new file mode 100644 index 000000000000..074af076748d --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Lvalue/before/Type.java @@ -0,0 +1,18 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private ClassChild myClassChild; + private ClassParent myClassParent; + private FaceChild myFaceChild; + private FaceParent myFaceParent; + + public void meth(ClassChild p) { + myClassChild = p; + myClassParent = p; + myFaceChild = p; + myFaceParent = p; + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Rvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Rvalue/after/Type.items new file mode 100644 index 000000000000..91683c097f98 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Rvalue/after/Type.items @@ -0,0 +1,15 @@ +Types: +PsiField:myField : FaceChild +PsiParameter:pfp : FaceChild +PsiReferenceExpression:myField : FaceChild +PsiReferenceExpression:myField : FaceChild +PsiReferenceExpression:myField : FaceChild +PsiReferenceExpression:myField : FaceChild +PsiReferenceExpression:pfp : FaceChild + +Conversions: +pcc -> $ +pcp -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Rvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Rvalue/after/Type.java new file mode 100644 index 000000000000..f16470efa1df --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Rvalue/after/Type.java @@ -0,0 +1,14 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private FaceChild myField; + public void meth(ClassChild pcc, ClassParent pcp, FaceChild pfc, FaceChild pfp) { + myField = pcc; + myField = pcp; + myField = pfc; + myField = pfp; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Rvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Rvalue/before/Type.java new file mode 100644 index 000000000000..e5cfab9f9af5 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceChild2Rvalue/before/Type.java @@ -0,0 +1,14 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private FaceParent myField; + public void meth(ClassChild pcc, ClassParent pcp, FaceChild pfc, FaceParent pfp) { + myField = pcc; + myField = pcp; + myField = pfc; + myField = pfp; + } +} diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceParent2Lvalue/after/Type.items b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceParent2Lvalue/after/Type.items new file mode 100644 index 000000000000..a10aad579ef2 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceParent2Lvalue/after/Type.items @@ -0,0 +1,17 @@ +Types: +PsiField:myClassChild : FaceParent +PsiField:myClassParent : FaceParent +PsiField:myFaceChild : FaceParent +PsiParameter:p : FaceParent +PsiReferenceExpression:myClassChild : FaceParent +PsiReferenceExpression:myClassParent : FaceParent +PsiReferenceExpression:myFaceChild : FaceParent +PsiReferenceExpression:p : FaceParent +PsiReferenceExpression:p : FaceParent +PsiReferenceExpression:p : FaceParent +PsiReferenceExpression:p : FaceParent + +Conversions: + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceParent2Lvalue/after/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceParent2Lvalue/after/Type.java new file mode 100644 index 000000000000..d53c072b9b56 --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceParent2Lvalue/after/Type.java @@ -0,0 +1,18 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private FaceParent myClassChild; + private FaceParent myClassParent; + private FaceParent myFaceChild; + private FaceParent myFaceParent; + + public void meth(FaceParent p) { + myClassChild = p; + myClassParent = p; + myFaceChild = p; + myFaceParent = p; + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceParent2Lvalue/before/Type.java b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceParent2Lvalue/before/Type.java new file mode 100644 index 000000000000..074af076748d --- /dev/null +++ b/java/typeMigration/testData/refactoring/migrateTypeSignature/typeRefFaceParent2Lvalue/before/Type.java @@ -0,0 +1,18 @@ +interface FaceParent {} +interface FaceChild extends FaceParent {} +class ClassParent implements FaceChild {} +class ClassChild extends ClassParent {} + +class Type { + private ClassChild myClassChild; + private ClassParent myClassParent; + private FaceChild myFaceChild; + private FaceParent myFaceParent; + + public void meth(ClassChild p) { + myClassChild = p; + myClassParent = p; + myFaceChild = p; + myFaceParent = p; + } +}
\ No newline at end of file |