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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user