KotlinType: accept non-class-or-interface Java types

This commit is contained in:
Chris Smowton
2021-11-10 15:59:24 +00:00
committed by Ian Lynagh
parent 1d95431a7a
commit 805b54897e

View File

@@ -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" }
}