mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Change type tests
Linux and MacOS produced different results, so the queried types are now limited to ones that are visible in the source code.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -5,13 +5,10 @@ class Foo {
|
||||
val propInt: Int = 1
|
||||
val propLong: Long = 1
|
||||
|
||||
/*
|
||||
TODO
|
||||
val propUByte: UByte = 1u
|
||||
val propUShort: UShort = 1u
|
||||
val propUInt: UInt = 1u
|
||||
val propULong: ULong = 1u
|
||||
*/
|
||||
|
||||
val propFloat: Float = 1.0f
|
||||
val propDouble: Double = 1.0
|
||||
@@ -25,14 +22,22 @@ TODO
|
||||
|
||||
val propNullableNothing: Nothing? = null
|
||||
|
||||
/*
|
||||
TODO
|
||||
val propArray: Array<Int> = arrayOf(1, 2, 3)
|
||||
|
||||
val propByteArray: ByteArray = byteArrayOf(1, 2, 3)
|
||||
val propShortArray: ShortArray = shortArrayOf(1, 2, 3)
|
||||
val propIntArray: IntArray = intArrayOf(1, 2, 3)
|
||||
val propLongArray: LongArray = longArrayOf(1, 2, 3)
|
||||
*/
|
||||
}
|
||||
|
||||
class Gen<T> {
|
||||
fun fn1(a: T) {
|
||||
val x: Gen<Gen<Int>> = Gen<Gen<Int>>()
|
||||
class Local<U> {}
|
||||
val y: Gen<Local<Int>> = Gen<Local<Int>>()
|
||||
val z = object { }
|
||||
}
|
||||
|
||||
fun fn2(a: Gen<out String>, b: Gen<in String>, c: Gen<in Nothing>, d: Gen<out Any?>) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import java
|
||||
|
||||
from Type t
|
||||
where
|
||||
t.fromSource()
|
||||
or
|
||||
exists(TypeAccess ta | ta.fromSource() and ta.getType() = t)
|
||||
select t.toString(), concat(t.getAPrimaryQlClass(), ", ")
|
||||
|
||||
Reference in New Issue
Block a user