diff options
Diffstat (limited to 'java/typeMigration/testData/refactoring/typeMigration/t129')
3 files changed, 42 insertions, 0 deletions
diff --git a/java/typeMigration/testData/refactoring/typeMigration/t129/after/Test.items b/java/typeMigration/testData/refactoring/typeMigration/t129/after/Test.items new file mode 100644 index 000000000000..8ca26492b5bd --- /dev/null +++ b/java/typeMigration/testData/refactoring/typeMigration/t129/after/Test.items @@ -0,0 +1,10 @@ +Types: +PsiMethodCallExpression:e.printStackTrace() : void +PsiParameter:e : Test.E1 | Test.E2 +PsiReferenceExpression:e : Test.E1 | Test.E2 + +Conversions: +e.printStackTrace() -> $ + +New expression type changes: +Fails: diff --git a/java/typeMigration/testData/refactoring/typeMigration/t129/after/test.java b/java/typeMigration/testData/refactoring/typeMigration/t129/after/test.java new file mode 100644 index 000000000000..33bb6bf973c1 --- /dev/null +++ b/java/typeMigration/testData/refactoring/typeMigration/t129/after/test.java @@ -0,0 +1,16 @@ +class Test { + static class E extends Exception { } + static class E1 extends E { } + static class E2 extends E { } + + void m(boolean f) { + try { + if (f) + throw new E1(); + else + throw new E2(); + } catch (E1 | E2 e) { + e.printStackTrace(); + } + } +}
\ No newline at end of file diff --git a/java/typeMigration/testData/refactoring/typeMigration/t129/before/test.java b/java/typeMigration/testData/refactoring/typeMigration/t129/before/test.java new file mode 100644 index 000000000000..8f2ad153d911 --- /dev/null +++ b/java/typeMigration/testData/refactoring/typeMigration/t129/before/test.java @@ -0,0 +1,16 @@ +class Test { + static class E extends Exception { } + static class E1 extends E { } + static class E2 extends E { } + + void m(boolean f) { + try { + if (f) + throw new E1(); + else + throw new E2(); + } catch (E e) { + e.printStackTrace(); + } + } +}
\ No newline at end of file |