Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/inlineClasses/inlineClassDeclaration.kt
T
Ilya Kirillov 1bbcae5ed2 [FIR] fix resolve contract violation from scopes
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier

^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00

21 lines
1.0 KiB
Kotlin
Vendored

// WITH_EXTENDED_CHECKERS
class A {
<!VALUE_CLASS_NOT_TOP_LEVEL!>inline<!> inner class B(val x: Int)
fun foo() {
<!VALUE_CLASS_NOT_TOP_LEVEL, WRONG_MODIFIER_TARGET!>inline<!> class C(val x: Int)
}
inner <!VALUE_CLASS_NOT_TOP_LEVEL, VALUE_CLASS_WITHOUT_JVM_INLINE_ANNOTATION!>value<!> class D(val x: Int)
}
<!VALUE_CLASS_NOT_FINAL!>open<!> inline class NotFinalClass1(val x: Int)
<!VALUE_CLASS_NOT_FINAL!>abstract<!> inline class NotFinalClass2(val x: Int)
<!VALUE_CLASS_NOT_FINAL!>sealed<!> inline class NotFinalClass3(val x: Int)
<!VALUE_CLASS_CANNOT_BE_CLONEABLE, VALUE_CLASS_WITHOUT_JVM_INLINE_ANNOTATION!>value<!> class CloneableClass1(val x: Int): Cloneable
<!VALUE_CLASS_CANNOT_BE_CLONEABLE!>inline<!> class CloneableClass2(val x: Int): <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.lang.Cloneable<!>
open class Test
inline class ExtendTest(val x: Int): <!SUPERTYPE_NOT_INITIALIZED, VALUE_CLASS_CANNOT_EXTEND_CLASSES!>Test<!>
inline class ImplementByDelegation(val x: Int) : Comparable<Int> by x