FIR: don't report error on inline nested classes
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ FILE: inlineClassDeclaration.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final inline class B : R|kotlin/Any| {
|
||||
public final inner inline class B : R|kotlin/Any| {
|
||||
public constructor(x: R|kotlin/Int|): R|A.B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
class A {
|
||||
<!INLINE_CLASS_NOT_TOP_LEVEL!>inline<!> class B(val x: Int)
|
||||
<!INLINE_CLASS_NOT_TOP_LEVEL!>inline<!> inner class B(val x: Int)
|
||||
fun foo() {
|
||||
<!INLINE_CLASS_NOT_TOP_LEVEL!>inline<!> class C(val x: Int)
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ object FirInlineClassDeclarationChecker : FirRegularClassChecker() {
|
||||
return
|
||||
}
|
||||
|
||||
if (context.containingDeclarations.size > 1) {
|
||||
if (declaration.isInner || declaration.isLocal) {
|
||||
reporter.reportOn(declaration.source, FirErrors.INLINE_CLASS_NOT_TOP_LEVEL, context)
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -15,16 +15,16 @@ inline class A9(final val x: Int)
|
||||
|
||||
class B1 {
|
||||
companion object {
|
||||
<!INLINE_CLASS_NOT_TOP_LEVEL!>inline<!> class C1(val x: Int)
|
||||
inline class C1(val x: Int)
|
||||
inner <!INLINE_CLASS_NOT_TOP_LEVEL!>inline<!> class C11(val x: Int)
|
||||
}
|
||||
|
||||
<!INLINE_CLASS_NOT_TOP_LEVEL!>inline<!> class C2(val x: Int)
|
||||
inline class C2(val x: Int)
|
||||
inner <!INLINE_CLASS_NOT_TOP_LEVEL!>inline<!> class C21(val x: Int)
|
||||
}
|
||||
|
||||
object B2 {
|
||||
<!INLINE_CLASS_NOT_TOP_LEVEL!>inline<!> class C3(val x: Int)
|
||||
inline class C3(val x: Int)
|
||||
inner <!INLINE_CLASS_NOT_TOP_LEVEL!>inline<!> class C31(val x: Int)
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -31,16 +31,16 @@ value class A9(final val x: Int)
|
||||
class B1 {
|
||||
companion object {
|
||||
@JvmInline
|
||||
<!INLINE_CLASS_NOT_TOP_LEVEL!>value<!> class C1(val x: Int)
|
||||
value class C1(val x: Int)
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
<!INLINE_CLASS_NOT_TOP_LEVEL!>value<!> class C2(val x: Int)
|
||||
value class C2(val x: Int)
|
||||
}
|
||||
|
||||
object B2 {
|
||||
@JvmInline
|
||||
<!INLINE_CLASS_NOT_TOP_LEVEL!>value<!> class C3(val x: Int)
|
||||
value class C3(val x: Int)
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
|
||||
Reference in New Issue
Block a user