IR: fix compiler warnings
This commit is contained in:
@@ -293,7 +293,7 @@ class IrFunctionFactory(private val irBuiltIns: IrBuiltIns, private val symbolTa
|
||||
}
|
||||
}
|
||||
|
||||
private fun IrClass.createMembers(isK: Boolean, isSuspend: Boolean, arity: Int, name: String, descriptorFactory: FunctionDescriptorFactory) {
|
||||
private fun IrClass.createMembers(isK: Boolean, isSuspend: Boolean, descriptorFactory: FunctionDescriptorFactory) {
|
||||
if (!isK) {
|
||||
val invokeSymbol = descriptorFactory.memberDescriptor("invoke") {
|
||||
val returnType = with(IrSimpleTypeBuilder()) {
|
||||
@@ -461,7 +461,7 @@ class IrFunctionFactory(private val irBuiltIns: IrBuiltIns, private val symbolTa
|
||||
klass.parent = packageFragment
|
||||
packageFragment.declarations += klass
|
||||
|
||||
klass.createMembers(isK, isSuspend, n, klass.name.identifier, descriptorFactory)
|
||||
klass.createMembers(isK, isSuspend, descriptorFactory)
|
||||
|
||||
return klass
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ class DumpIrTreeVisitor(
|
||||
}
|
||||
|
||||
private fun IrMemberAccessExpression<*>.getTypeParameterNames(expectedCount: Int): List<String> =
|
||||
if (this is IrDeclarationReference && symbol.isBound)
|
||||
if (symbol.isBound)
|
||||
symbol.owner.getTypeParameterNames(expectedCount)
|
||||
else
|
||||
getPlaceholderParameterNames(expectedCount)
|
||||
|
||||
@@ -206,7 +206,9 @@ class SymbolTable(
|
||||
}
|
||||
} else {
|
||||
if (d.isBound()) {
|
||||
((d.owner as? IrSymbolDeclaration<*>)?.symbol ?: descriptorToSymbol[d]) as S?
|
||||
val result = (d.owner as? IrSymbolDeclaration<*>)?.symbol ?: descriptorToSymbol[d]
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
result as S?
|
||||
} else {
|
||||
descriptorToSymbol[d]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user