Support Nothing return type
This commit is contained in:
committed by
Dmitry Petrov
parent
24863a84c4
commit
607cf4c86d
+5
@@ -192,6 +192,11 @@ class ExpressionCodegen(
|
||||
} else {
|
||||
(callable as CallableMethod).genInvokeDefaultInstruction(mv)
|
||||
}
|
||||
val returnType = expression.descriptor.returnType
|
||||
if (returnType != null && KotlinBuiltIns.isNothing(returnType)) {
|
||||
mv.aconst(null)
|
||||
mv.athrow()
|
||||
}
|
||||
return StackValue.onStack(callable.returnType)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user