SuppressionScope non-extending subtype of SuppressionComment

This commit is contained in:
Philip Ginsbach
2021-10-13 11:40:32 +01:00
parent d0ecabad19
commit 4a0aac8505

View File

@@ -60,9 +60,7 @@ class SuppressionComment extends Comment {
/**
* The scope of an alert suppression comment.
*/
class SuppressionScope extends ElementBase {
SuppressionScope() { this instanceof SuppressionComment }
class SuppressionScope extends ElementBase instanceof SuppressionComment {
/**
* Holds if this element is at the specified location.
* The location spans column `startcolumn` of line `startline` to
@@ -73,7 +71,7 @@ class SuppressionScope extends ElementBase {
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
this.(SuppressionComment).covers(filepath, startline, startcolumn, endline, endcolumn)
super.covers(filepath, startline, startcolumn, endline, endcolumn)
}
}