Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/unsupported/javaOverridesKotlinProperty.kt
T
Nikita Bobko 8314812ef9 2/2 FirUnsupportedSyntheticCallableReferenceChecker: don't report error on FirJavaOverriddenSyntheticPropertySymbol
Meta issue: KT-8575
^KT-58061 Fixed
Review: https://jetbrains.team/p/kt/reviews/9677

This commit fixes an inconsistency between
FirUnsupportedSyntheticCallableReferenceChecker and
UnsupportedSyntheticCallableReferenceChecker

In K1 such properties were not considered synthetic and are called
JavaPropertyDescriptor. That's why we need to do an additional check in
K2 checker, while in K1 we didn't need to do it

Also see the previous commit for more related tests that already was
green without this fix but are related to KT-58061 problem
2023-04-19 14:33:45 +00:00

18 lines
285 B
Kotlin
Vendored

// !LANGUAGE: -ReferencesToSyntheticJavaProperties
// FIR_IDENTICAL
// FILE: Foo.java
public class Foo extends Base {
@Override
public int getFoo() {
return super.getFoo();
}
}
// FILE: Main.kt
open class Base {
open val foo: Int = 904
}
val prop = Foo::foo