[FIR2IR] Don't access symbol.owner in DataClassMembersGenerator
This commit is contained in:
committed by
Space Team
parent
50f1ea79c5
commit
da531bc261
@@ -240,7 +240,7 @@ abstract class DataClassMembersGenerator(
|
||||
|
||||
protected fun IrBuilderWithScope.getHashCodeOf(hashCodeFunctionInfo: HashCodeFunctionInfo, irValue: IrExpression): IrExpression {
|
||||
val hashCodeFunctionSymbol = hashCodeFunctionInfo.symbol
|
||||
val hasDispatchReceiver = hashCodeFunctionSymbol.hasDispatchReceiver()
|
||||
val hasDispatchReceiver = hashCodeFunctionInfo.hasDispatchReceiver ?: hashCodeFunctionSymbol.hasDispatchReceiver()
|
||||
return irCall(
|
||||
hashCodeFunctionSymbol,
|
||||
context.irBuiltIns.intType,
|
||||
@@ -263,6 +263,13 @@ abstract class DataClassMembersGenerator(
|
||||
|
||||
interface HashCodeFunctionInfo {
|
||||
val symbol: IrSimpleFunctionSymbol
|
||||
|
||||
/**
|
||||
* Implement it if [symbol] may be unbound
|
||||
*/
|
||||
val hasDispatchReceiver: Boolean?
|
||||
get() = null
|
||||
|
||||
fun commitSubstituted(irMemberAccessExpression: IrMemberAccessExpression<*>)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user