FIR2IR: convert enums with non-primary default ctor correctly
see added test for example
This commit is contained in:
@@ -213,6 +213,9 @@ val IrClassSymbol.functions: Sequence<IrSimpleFunctionSymbol>
|
||||
val IrClass.constructors: Sequence<IrConstructor>
|
||||
get() = declarations.asSequence().filterIsInstance<IrConstructor>()
|
||||
|
||||
val IrClass.defaultConstructor: IrConstructor?
|
||||
get() = constructors.firstOrNull { ctor -> ctor.valueParameters.all { it.defaultValue != null } }
|
||||
|
||||
val IrClassSymbol.constructors: Sequence<IrConstructorSymbol>
|
||||
get() = owner.constructors.map { it.symbol }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user