[FIR] Report SEALED_CLASS_CONSTRUCTOR_CALL on expression
This commit is contained in:
committed by
TeamCityServer
parent
48994976d4
commit
088db0e138
+1
-1
@@ -33,7 +33,7 @@ object FirSealedClassConstructorCallChecker : FirQualifiedAccessChecker() {
|
||||
?: return
|
||||
|
||||
if (typeFir.status.modality == Modality.SEALED) {
|
||||
reporter.reportOn(expression.calleeReference.source, FirErrors.SEALED_CLASS_CONSTRUCTOR_CALL, context)
|
||||
reporter.reportOn(expression.source, FirErrors.SEALED_CLASS_CONSTRUCTOR_CALL, context)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
sealed class Base {
|
||||
fun foo() = <!SEALED_CLASS_CONSTRUCTOR_CALL!>Base<!>()
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
sealed class Base {
|
||||
fun foo() = <!SEALED_CLASS_CONSTRUCTOR_CALL!>Base()<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user