Skip to content

Commit 6d5d78e

Browse files
authored
Merge pull request #10275 from igfoo/igfoo/TypeResults
Kotlin: Fix the type of TypeResultGeneric.cast
2 parents c339a2d + 3646d1d commit 6d5d78e

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)