[LT2FIR] Fix missing "expect" modifier on members of nested classes
For members of nested classes inside expect class `classWrapper.hasExpect()` would be false, because it only reflects modifiers of nested class itself and not aware of "expect" modifier inherited from the parent class. Fix is done in same way in PSI2FIR, see `PsiRawFirBuilder.Visitor.toFirProperty`. This fix now makes it possible to add test for functionality from previous commit. Review: KT-MR-12107 ^KT-61784
This commit is contained in:
committed by
Space Team
parent
c6d7f15070
commit
2dae7ce6c1
+15
@@ -0,0 +1,15 @@
|
||||
// TODO: test fails, fix in subsequent commits
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
<!INCOMPATIBLE_MATCHING{JVM}!>expect class DefaultArgsInNestedClass {
|
||||
<!INCOMPATIBLE_MATCHING{JVM}!>annotation class Nested<!INCOMPATIBLE_MATCHING{JVM}!>(val p: String = "")<!><!>
|
||||
}<!>
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
class DefaultArgsInNestedClassImpl {
|
||||
annotation class Nested(val p: String = "")
|
||||
}
|
||||
|
||||
// Incompatible because of bug KT-31636
|
||||
actual typealias DefaultArgsInNestedClass = DefaultArgsInNestedClassImpl
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// TODO: test fails, fix in subsequent commits
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
expect class DefaultArgsInNestedClass {
|
||||
annotation class Nested(val p: String = "")
|
||||
}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
class DefaultArgsInNestedClassImpl {
|
||||
annotation class Nested(val p: String = "")
|
||||
}
|
||||
|
||||
// Incompatible because of bug KT-31636
|
||||
actual typealias <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>DefaultArgsInNestedClass<!> = DefaultArgsInNestedClassImpl
|
||||
Reference in New Issue
Block a user