Files
kotlin-fork/compiler/testData/diagnostics/tests/visibility/invisibleSetterOfJavaClass.fir.kt
T
2023-01-31 08:39:43 +00:00

30 lines
659 B
Kotlin
Vendored

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