diff --git a/j2k/tests/testData/ast/dropAccessors/DifferentProtectedFieldName.java b/j2k/tests/testData/ast/dropAccessors/DifferentProtectedFieldName.java new file mode 100644 index 00000000000..bd531f51948 --- /dev/null +++ b/j2k/tests/testData/ast/dropAccessors/DifferentProtectedFieldName.java @@ -0,0 +1,20 @@ +public class AAA { + protected int myX = 42; + + public int getX() { + return myX; + } + + public void foo(AAA other) { + System.out.println(myX); + System.out.println(other.myX); + myX = 10; + } +} + +class BBB extends AAA { + void bar() { + System.out.println(myX); + myX = 10; + } +} diff --git a/j2k/tests/testData/ast/dropAccessors/DifferentProtectedFieldName.kt b/j2k/tests/testData/ast/dropAccessors/DifferentProtectedFieldName.kt new file mode 100644 index 00000000000..c434164e16c --- /dev/null +++ b/j2k/tests/testData/ast/dropAccessors/DifferentProtectedFieldName.kt @@ -0,0 +1,17 @@ +public class AAA { + public var x: Int = 42 + protected set + + public fun foo(other: AAA) { + System.out.println(x) + System.out.println(other.x) + x = 10 + } +} + +class BBB : AAA() { + fun bar() { + System.out.println(x) + x = 10 + } +} \ No newline at end of file