diff options
Diffstat (limited to 'java/typeMigration/testData/refactoring/typeMigration/t17')
3 files changed, 52 insertions, 0 deletions
diff --git a/java/typeMigration/testData/refactoring/typeMigration/t17/after/Test.items b/java/typeMigration/testData/refactoring/typeMigration/t17/after/Test.items new file mode 100644 index 000000000000..aa0aa0551659 --- /dev/null +++ b/java/typeMigration/testData/refactoring/typeMigration/t17/after/Test.items @@ -0,0 +1,18 @@ +Types: +PsiField:f : B +PsiMethodCallExpression:f.foo(s) : B +PsiMethodCallExpression:s.add(f) : boolean +PsiParameter:s : java.util.Set<B> +PsiReferenceExpression:f : B +PsiReferenceExpression:f : B +PsiReferenceExpression:s : java.util.Set<B> +PsiReferenceExpression:s : java.util.Set<B> + +Conversions: +f -> $ +f.foo(s) -> $ +s -> $ +s.add(f) -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/typeMigration/t17/after/test.java b/java/typeMigration/testData/refactoring/typeMigration/t17/after/test.java new file mode 100644 index 000000000000..73530057f21b --- /dev/null +++ b/java/typeMigration/testData/refactoring/typeMigration/t17/after/test.java @@ -0,0 +1,17 @@ +import java.util.*; +class Test { + B f; + + A bar(Set<B> s) { + s.add(f); + return f.foo(s); + } +} +class A { + <T> T foo(Set<T> t) { + return null; + } +} + +class B extends A { +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/typeMigration/t17/before/test.java b/java/typeMigration/testData/refactoring/typeMigration/t17/before/test.java new file mode 100644 index 000000000000..a425495c6065 --- /dev/null +++ b/java/typeMigration/testData/refactoring/typeMigration/t17/before/test.java @@ -0,0 +1,17 @@ +import java.util.*; +class Test { + A f; + + A bar(Set<A> s) { + s.add(f); + return f.foo(s); + } +} +class A { + <T> T foo(Set<T> t) { + return null; + } +} + +class B extends A { +}
\ No newline at end of file |