[JS SCRIPT] Fix IrBuiltIns to make it stable if symbols already defined
This commit is contained in:
@@ -60,7 +60,7 @@ class IrBuiltIns(
|
|||||||
operatorDescriptor.addValueParameter(valueParameterDescriptor)
|
operatorDescriptor.addValueParameter(valueParameterDescriptor)
|
||||||
}
|
}
|
||||||
|
|
||||||
val symbol = symbolTable.declareSimpleFunction(UNDEFINED_OFFSET, UNDEFINED_OFFSET, BUILTIN_OPERATOR, operatorDescriptor) {
|
val symbol = symbolTable.declareSimpleFunctionIfNotExists(operatorDescriptor) {
|
||||||
val operator = IrBuiltInOperator(it, Name.identifier(name), returnType)
|
val operator = IrBuiltInOperator(it, Name.identifier(name), returnType)
|
||||||
operator.parent = packageFragment
|
operator.parent = packageFragment
|
||||||
packageFragment.declarations += operator
|
packageFragment.declarations += operator
|
||||||
@@ -134,7 +134,7 @@ class IrBuiltIns(
|
|||||||
buildSimpleType()
|
buildSimpleType()
|
||||||
}
|
}
|
||||||
|
|
||||||
return symbolTable.declareSimpleFunction(UNDEFINED_OFFSET, UNDEFINED_OFFSET, BUILTIN_OPERATOR, operatorDescriptor) {
|
return symbolTable.declareSimpleFunctionIfNotExists(operatorDescriptor) {
|
||||||
val operator = IrBuiltInOperator(it, name, returnIrType)
|
val operator = IrBuiltInOperator(it, name, returnIrType)
|
||||||
operator.parent = packageFragment
|
operator.parent = packageFragment
|
||||||
packageFragment.declarations += operator
|
packageFragment.declarations += operator
|
||||||
|
|||||||
Reference in New Issue
Block a user