[FIR] KT-57809: Allow external constructors without arguments

The constructor with the required parameters may
not have been defined, and since JS/IR box tests
pass, it seems, we don't have to resolve
into anything meaningful. We could generate
the appropriate constructor like dynamic type
members are generated, but, again, K1 IR doesn't
even contain a delegating constructor call.

^KT-57809 Fixed
This commit is contained in:
Nikolay Lunyak
2023-04-05 19:39:57 +03:00
committed by Space Team
parent 96a25b7b7d
commit 247f5529d2
8 changed files with 34 additions and 7 deletions
@@ -24,7 +24,7 @@ FILE fqName:foo fileName:/nativeNativeKotlin.kt
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:foo.B
CONSTRUCTOR visibility:public <> () returnType:foo.B [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in foo.A'
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:OPEN visibility:public [external] superTypes:[foo.A]'
FUN name:bar visibility:public modality:FINAL <> ($this:foo.B) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:foo.B
@@ -13,7 +13,7 @@ open external class A {
open external class B : A {
constructor() /* primary */ {
super/*A*/()
super/*Any*/()
/* <init>() */
}