Properly process catch parameter declaration.
This commit is contained in:
committed by
alexander-gorshenev
parent
bab0a85336
commit
0b096e2208
+1
-1
@@ -336,7 +336,7 @@ message IrBlockBody {
|
||||
}
|
||||
|
||||
message IrCatch {
|
||||
required KotlinDescriptor parameter = 1;
|
||||
required IrDeclaration catch_parameter = 1;
|
||||
required IrExpression result = 2;
|
||||
}
|
||||
|
||||
|
||||
+2
-3
@@ -151,7 +151,7 @@ internal class IrSerializer(val context: Context,
|
||||
|
||||
fun serializeCatch(catch: IrCatch): KonanIr.IrCatch {
|
||||
val proto = KonanIr.IrCatch.newBuilder()
|
||||
.setParameter(serializeDescriptor(catch.parameter))
|
||||
.setCatchParameter(serializeDeclaration(catch.catchParameter))
|
||||
.setResult(serializeExpression(catch.result))
|
||||
return proto.build()
|
||||
}
|
||||
@@ -708,8 +708,7 @@ internal class IrDeserializer(val context: Context,
|
||||
}
|
||||
|
||||
fun deserializeCatch(proto: KonanIr.IrCatch, start: Int, end: Int): IrCatch {
|
||||
val parameter = deserializeDescriptor(proto.getParameter()) as VariableDescriptor
|
||||
val catchParameter = IrVariableImpl(start, end, IrDeclarationOrigin.CATCH_PARAMETER, parameter)
|
||||
val catchParameter = deserializeDeclaration(proto.catchParameter) as IrVariable
|
||||
val result = deserializeExpression(proto.getResult())
|
||||
|
||||
return IrCatchImpl(start, end, catchParameter, result)
|
||||
|
||||
Reference in New Issue
Block a user