[K/JS] Allow private constructors inside external declarations ^KT-65964 Fixed
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@ abstract class FirWebCommonExternalChecker(private val allowCompanionInInterface
|
||||
if (declaration is FirPropertyAccessor && declaration.isDirectlyExternal(context.session)) {
|
||||
reporter.reportOn(declaration.source, FirWebCommonErrors.WRONG_EXTERNAL_DECLARATION, "property accessor", context)
|
||||
} else if (
|
||||
declaration !is FirPrimaryConstructor &&
|
||||
declaration !is FirConstructor &&
|
||||
declaration !is FirField &&
|
||||
declaration.isPrivateMemberOfExternalClass(context.session)
|
||||
) {
|
||||
|
||||
@@ -67,7 +67,11 @@ class JsExternalChecker(private val allowCompanionInInterface: Boolean) : Declar
|
||||
|
||||
if (descriptor is PropertyAccessorDescriptor && isDirectlyExternal(declaration, descriptor)) {
|
||||
trace.report(ErrorsJs.WRONG_EXTERNAL_DECLARATION.on(declaration, "property accessor"))
|
||||
} else if (isPrivateMemberOfExternalClass(descriptor)) {
|
||||
} else if (
|
||||
descriptor !is ConstructorDescriptor &&
|
||||
descriptor !is FieldDescriptor &&
|
||||
isPrivateMemberOfExternalClass(descriptor)
|
||||
) {
|
||||
trace.report(ErrorsJs.WRONG_EXTERNAL_DECLARATION.on(declaration, "private member of class"))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user