mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Kotlin: Add a Kotlin 2 copy of the testsuite
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
public class Test<T> {
|
||||
|
||||
public T field;
|
||||
public T method() { return field; }
|
||||
|
||||
}
|
||||
|
||||
class FieldUsed {}
|
||||
class MethodUsed {}
|
||||
class ConstructorUsed {}
|
||||
class NeitherUsed {}
|
||||
|
||||
class User {
|
||||
|
||||
public static void test(Test<NeitherUsed> neitherUsed, Test<MethodUsed> methodUsed, Test<FieldUsed> fieldUsed) {
|
||||
|
||||
fieldUsed.field = null;
|
||||
methodUsed.method();
|
||||
Test<ConstructorUsed> constructorUsed = new Test<ConstructorUsed>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user