Files
kotlin-fork/compiler/testData/diagnostics/tests/visibility/lackOfInvisibleSetterOfJavaClassInSamePackage.fir.kt
T
2021-10-03 17:10:06 +03:00

24 lines
506 B
Kotlin
Vendored

// FILE: Foo.java
public class Foo {
public String getBar() { return ""; }
protected void setBar(String x) { }
public String getFoo() { return ""; }
private void setFoo(String x) { }
}
// FILE: main.kt
class Data(var x: Foo)
class B : Foo() {
fun baz(a: Foo, t: Foo, d: Data) {
a.bar = t.bar
<!INVISIBLE_SETTER!>a.foo<!> = t.foo
if (d.x is B) {
d.x.bar = d.x.bar + ""
<!INVISIBLE_SETTER!>d.x.foo<!> = d.x.foo + ""
}
}
}