From 805b54897e1e4d709f3be276c4dcbcd61ca5f97f Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 10 Nov 2021 15:59:24 +0000 Subject: [PATCH] KotlinType: accept non-class-or-interface Java types --- java/ql/lib/semmle/code/java/KotlinType.qll | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/java/ql/lib/semmle/code/java/KotlinType.qll b/java/ql/lib/semmle/code/java/KotlinType.qll index 3122e124d9c..a4c07007cbf 100755 --- a/java/ql/lib/semmle/code/java/KotlinType.qll +++ b/java/ql/lib/semmle/code/java/KotlinType.qll @@ -9,18 +9,18 @@ class KotlinType extends Element, @kt_type { class KotlinNullableType extends KotlinType, @kt_nullable_type { override string toString() { - exists(ClassOrInterface ci | - kt_nullable_types(this, ci) and - result = "Kotlin nullable " + ci.toString()) + exists(RefType javaType | + kt_nullable_types(this, javaType) and + result = "Kotlin nullable " + javaType.toString()) } override string getAPrimaryQlClass() { result = "KotlinNullableType" } } class KotlinNotnullType extends KotlinType, @kt_notnull_type { override string toString() { - exists(ClassOrInterface ci | - kt_notnull_types(this, ci) and - result = "Kotlin not-null " + ci.toString()) + exists(RefType javaType | + kt_notnull_types(this, javaType) and + result = "Kotlin not-null " + javaType.toString()) } override string getAPrimaryQlClass() { result = "KotlinNotnullType" } }