[KAPT] Don't fail on illegal delegate
Kapt ignores error diagnostics, but backend can't compile such code at all This is workaround so backend won't fail. #KT-46176 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
0c0710bb79
commit
0c6066db74
@@ -188,6 +188,12 @@ class JvmRuntimeTypes(
|
||||
else -> if (isMutable) mutablePropertyReferences else propertyReferences
|
||||
}
|
||||
|
||||
return classes[arity].defaultType
|
||||
return if (arity >= 0) {
|
||||
classes[arity].defaultType
|
||||
} else {
|
||||
//in case of ErrorUtils.ERROR_PROPERTY there would be no dispatchReceiverParameter and arity becomes negative
|
||||
//so we just take zero argument reference class (because it is incorrect anyway)
|
||||
classes[0].defaultType
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user