Skip to content

Commit

Permalink
Fixed GTV name of kotlin intersection type.
Browse files Browse the repository at this point in the history
  • Loading branch information
traceyyoshima committed Oct 10, 2023
1 parent 2cb2623 commit e9af625
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/kotlin/org/openrewrite/kotlin/KotlinTypeMapping.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,9 @@ class KotlinTypeMapping(typeCache: JavaTypeCache, firSession: FirSession, firFil
"*"
}

is ConeIntersectionType -> {
""
}
else -> {
type.toString()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void genericIntersectionType() {
public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, AtomicBoolean atomicBoolean) {
if (methodMatcher.matches(method)) {
assertThat(method.getMethodType().toString())
.isEqualTo("kotlin.collections.CollectionsKt{name=listOf,return=kotlin.collections.List<kotlin.Pair<kotlin.String, Generic{it(kotlin/Comparable<*> & java/io/Serializable)kotlin.Comparable<Generic{*}> & java.io.Serializable}>>,parameters=[kotlin.Array<Generic{? extends Generic{T}}>]}");
.isEqualTo("kotlin.collections.CollectionsKt{name=listOf,return=kotlin.collections.List<kotlin.Pair<kotlin.String, Generic{kotlin.Comparable<Generic{*}> & java.io.Serializable}>>,parameters=[kotlin.Array<Generic{? extends Generic{T}}>]}");
found.set(true);
}
return super.visitMethodInvocation(method, atomicBoolean);
Expand Down

0 comments on commit e9af625

Please sign in to comment.