[JS IR BE] Remove support for dynamic symbols and descriptors
Dynamic expressions in IR are now represented as IrDynamicOperatorExpression We don't have dynamic functions, dynamic dispatch receivers anymore
This commit is contained in:
+10
@@ -126,6 +126,12 @@ class CheckIrElementVisitor(
|
||||
override fun visitCall(expression: IrCall) {
|
||||
super.visitCall(expression)
|
||||
|
||||
val function = expression.symbol.owner
|
||||
|
||||
if (function.dispatchReceiverParameter?.type is IrDynamicType) {
|
||||
reportError(expression, "Dispatch receivers with 'dynamic' type are not allowed")
|
||||
}
|
||||
|
||||
val returnType = expression.descriptor.returnType
|
||||
if (returnType == null) {
|
||||
reportError(expression, "${expression.descriptor} return type is null")
|
||||
@@ -232,6 +238,10 @@ class CheckIrElementVisitor(
|
||||
override fun visitFunction(declaration: IrFunction) {
|
||||
super.visitFunction(declaration)
|
||||
|
||||
if (declaration.dispatchReceiverParameter?.type is IrDynamicType) {
|
||||
reportError(declaration, "Dispatch receivers with 'dynamic' type are not allowed")
|
||||
}
|
||||
|
||||
for ((i, p) in declaration.valueParameters.withIndex()) {
|
||||
if (p.index != i) {
|
||||
reportError(declaration, "Inconsistent index of value parameter ${p.index} != $i")
|
||||
|
||||
+1
-3
@@ -188,9 +188,7 @@ class InlineClassLowering(val context: BackendContext) {
|
||||
override fun visitCall(call: IrCall): IrExpression {
|
||||
call.transformChildrenVoid(this)
|
||||
val function = call.symbol.owner
|
||||
if (
|
||||
function.isDynamic() ||
|
||||
function.parent !is IrClass ||
|
||||
if (function.parent !is IrClass ||
|
||||
function.isStaticMethodOfClass ||
|
||||
!function.parentAsClass.isInline ||
|
||||
(function is IrSimpleFunction && !function.isReal) ||
|
||||
|
||||
Reference in New Issue
Block a user