mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
24 lines
436 B
Java
24 lines
436 B
Java
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>();
|
|
|
|
}
|
|
|
|
}
|