Skip to content

Commit 82a2f43

Browse files
committed
Resolve a newly-introduced ambiguity
Also fix a simple redundancy noticed while debugging
1 parent f48d87b commit 82a2f43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

java/ql/lib/semmle/code/java/Type.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ class LocalClass extends LocalClassOrInterface, NestedClass {
839839
class TopLevelType extends RefType {
840840
TopLevelType() {
841841
not enclInReftype(this, _) and
842-
(this instanceof Class or this instanceof Interface)
842+
this instanceof ClassOrInterface
843843
}
844844
}
845845

java/ql/src/utils/stub-generator/Stubs.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ private RefType getAReferencedType(RefType t) {
515515

516516
/** A top level type whose file should be stubbed */
517517
class GeneratedTopLevel extends TopLevelType instanceof GeneratedType {
518-
GeneratedTopLevel() { this = this.getSourceDeclaration() }
518+
GeneratedTopLevel() { this = this.(ClassOrInterface).getSourceDeclaration() }
519519

520520
private TopLevelType getAnImportedType() {
521521
result = getAReferencedType(this).getSourceDeclaration() and

0 commit comments

Comments
 (0)