K2: build SAM-based function type for a given captured type properly
Before this commit, we assumed (erroneously) that a captured type cannot have an associated SAM-based function type. In this commit we changed this assumption, replacing a captured type with its lower type for this purpose #KT-63379 Fixed
This commit is contained in:
committed by
Space Team
parent
8588588760
commit
a02cf76d6c
@@ -81,10 +81,11 @@ class FirSamResolver(
|
||||
}
|
||||
|
||||
is ConeStubType, is ConeTypeParameterType, is ConeTypeVariableType,
|
||||
is ConeCapturedType, is ConeDefinitelyNotNullType, is ConeIntersectionType,
|
||||
is ConeIntegerLiteralType,
|
||||
is ConeDefinitelyNotNullType, is ConeIntersectionType, is ConeIntegerLiteralType,
|
||||
-> null
|
||||
|
||||
is ConeCapturedType -> type.lowerType?.let { getFunctionTypeForPossibleSamType(it) }
|
||||
|
||||
is ConeLookupTagBasedType -> unreachableBranch(type)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user