Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions java/ql/lib/semmle/code/java/Member.qll
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,9 @@ class Field extends Member, ExprParent, @field, Variable {
override string getAPrimaryQlClass() { result = "Field" }
}

overlay[local]
private class DiscardableField extends DiscardableReferableLocatable, @field { }

/** An instance field. */
class InstanceField extends Field {
InstanceField() { not this.isStatic() }
Expand Down
5 changes: 5 additions & 0 deletions java/ql/lib/semmle/code/java/Type.qll
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module;
import Member
import Modifier
import JDK
private import semmle.code.java.Overlay

/**
* Holds if reference type `t` is an immediate super-type of `sub`.
Expand Down Expand Up @@ -998,6 +999,10 @@ class ClassOrInterface extends RefType, @classorinterface {
CompanionObject getCompanionObject() { type_companion_object(this, _, result) }
}

overlay[local]
private class DiscardableClassOrInterface extends DiscardableReferableLocatable, @classorinterface {
}

private string getAPublicObjectMethodSignature() {
exists(Method m |
m.getDeclaringType() instanceof TypeObject and
Expand Down
Loading