mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Fix and add test for java/subtle-inherited-call involving inheritence from generic types
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
| GenericTest.java:14:7:14:9 | f(...) | A $@ is called instead of a $@. | GenericTest.class:0:0:0:0 | f | method declared in a superclass | GenericTest.java:9:8:9:8 | f | method with the same signature in an enclosing class |
|
||||
| Test.java:14:7:14:9 | f(...) | A $@ is called instead of a $@. | Test.java:3:8:3:8 | f | method declared in a superclass | Test.java:9:8:9:8 | f | method with the same signature in an enclosing class |
|
||||
@@ -0,0 +1 @@
|
||||
Violations of Best Practice/Naming Conventions/AmbiguousOuterSuper.ql
|
||||
@@ -0,0 +1,19 @@
|
||||
public class GenericTest<T> {
|
||||
|
||||
void f() { }
|
||||
|
||||
}
|
||||
|
||||
class Outer2 {
|
||||
|
||||
void f() { }
|
||||
|
||||
class Inner<T> extends GenericTest<T> {
|
||||
|
||||
public void test() {
|
||||
f();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
19
java/ql/test/query-tests/AmbiguousOuterSuper/Test.java
Normal file
19
java/ql/test/query-tests/AmbiguousOuterSuper/Test.java
Normal file
@@ -0,0 +1,19 @@
|
||||
public class Test {
|
||||
|
||||
void f() { }
|
||||
|
||||
}
|
||||
|
||||
class Outer {
|
||||
|
||||
void f() { }
|
||||
|
||||
class Inner extends Test {
|
||||
|
||||
public void test() {
|
||||
f();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user