KAPT: Fix error types for receivers and property setters in stubs
When using correct error types and there is a property setter or receiver for an unknown type then the parameter type would be `Object` instead of the error type. This fixes KT-46965 and KT-46966
This commit is contained in:
committed by
Alexander Udalov
parent
dd051c1556
commit
3c69a0493e
@@ -0,0 +1,20 @@
|
||||
// CORRECT_ERROR_TYPES
|
||||
|
||||
@Suppress("UNRESOLVED_REFERENCE")
|
||||
class TypeHook {
|
||||
var customProperty: UnknownType
|
||||
get() = UnknownType()
|
||||
set(value) {}
|
||||
|
||||
var UnknownType.receiverProperty: UnknownType
|
||||
get() = UnknownType()
|
||||
set(value) {}
|
||||
|
||||
fun UnknownType.receiverFunction(): UnknownType = UnknownType()
|
||||
|
||||
companion object {
|
||||
var UnknownType.extensionProperty: UnknownType
|
||||
get() = UnknownType()
|
||||
set(value) {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user