Skip to content

Commit

Permalink
Fix isTypeParameter when parent type has out or in keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
matejdro committed Aug 10, 2023
1 parent 626da5b commit d7f0917
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public sealed class TypeReference {

fun KtUserType.isTypeParameter(): Boolean {
return parents.filterIsInstance<KtClassOrObject>().first().typeParameters.any {
val typeParameter = it.text.split(":").first().trim()
val typeParameter = it.text.split(":").first().removePrefix("out").removePrefix("in").trim()
typeParameter == text
}
}
Expand Down

0 comments on commit d7f0917

Please sign in to comment.