Use original descriptors for functions when generating stubs

Descriptors for builtin class members on JVM are substituted.
This commit is contained in:
Dmitry Petrov
2017-06-26 16:14:15 +03:00
parent 5e5a1bd686
commit ae71833a12
5 changed files with 540 additions and 2 deletions
@@ -73,13 +73,13 @@ class DeclarationStubGenerator(
}
fun generateFunctionStub(descriptor: FunctionDescriptor): IrSimpleFunction =
symbolTable.declareSimpleFunction(UNDEFINED_OFFSET, UNDEFINED_OFFSET, origin, descriptor).also { irFunction ->
symbolTable.declareSimpleFunction(UNDEFINED_OFFSET, UNDEFINED_OFFSET, origin, descriptor.original).also { irFunction ->
generateTypeParameterStubs(descriptor.typeParameters, irFunction)
generateValueParametersStubs(descriptor.valueParameters, irFunction)
}
fun generateConstructorStub(descriptor: ClassConstructorDescriptor): IrConstructor =
symbolTable.declareConstructor(UNDEFINED_OFFSET, UNDEFINED_OFFSET, origin, descriptor).also { irConstructor ->
symbolTable.declareConstructor(UNDEFINED_OFFSET, UNDEFINED_OFFSET, origin, descriptor.original).also { irConstructor ->
generateValueParametersStubs(descriptor.valueParameters, irConstructor)
}