[K/JS] Allow private constructors inside external declarations ^KT-65964 Fixed

This commit is contained in:
Artem Kobzar
2024-02-27 16:51:07 +00:00
committed by Space Team
parent aabb7aaa18
commit 800704a130
2 changed files with 6 additions and 2 deletions
@@ -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"))
}