Skip to content

Commit 3646d1d

Browse files
committed
Kotlin: Fix the type of TypeResultGeneric.cast
1 parent 4f7eb7b commit 3646d1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/kotlin-extractor/src/main/kotlin/utils/TypeResults.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ package com.github.codeql
1313
* "OuterClass<ConcreteArgument>" or "OtherClass<? extends Bound>") or an array ("componentShortName[]").
1414
*/
1515
data class TypeResultGeneric<SignatureType,out LabelType: AnyDbType>(val id: Label<out LabelType>, val signature: SignatureType, val shortName: String) {
16-
fun <U: AnyDbType> cast(): TypeResult<U> {
16+
fun <U: AnyDbType> cast(): TypeResultGeneric<SignatureType,U> {
1717
@Suppress("UNCHECKED_CAST")
18-
return this as TypeResult<U>
18+
return this as TypeResultGeneric<SignatureType,U>
1919
}
2020
}
2121
data class TypeResultsGeneric<SignatureType>(val javaResult: TypeResultGeneric<SignatureType,DbType>, val kotlinResult: TypeResultGeneric<SignatureType,DbKt_type>)

0 commit comments

Comments
 (0)