Skip to content

Commit a92a55f

Browse files
authored
Merge pull request github#13001 from kaspersv/kaspersv/csharp-explicit-this-receiver
C#: Make implicit this receivers explicit
2 parents 733a000 + bfc48ef commit a92a55f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

csharp/ql/lib/semmle/code/cil/Attribute.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ class Attribute extends Element, @cil_attribute {
1212
Method getConstructor() { cil_attribute(this, _, result) }
1313

1414
/** Gets the type of this attribute. */
15-
Type getType() { result = getConstructor().getDeclaringType() }
15+
Type getType() { result = this.getConstructor().getDeclaringType() }
1616

17-
override string toString() { result = "[" + getType().getName() + "(...)]" }
17+
override string toString() { result = "[" + this.getType().getName() + "(...)]" }
1818

1919
/** Gets the value of the `i`th argument of this attribute. */
2020
string getArgument(int i) { cil_attribute_positional_argument(this, i, result) }
@@ -23,9 +23,9 @@ class Attribute extends Element, @cil_attribute {
2323
string getNamedArgument(string name) { cil_attribute_named_argument(this, name, result) }
2424

2525
/** Gets an argument of this attribute, if any. */
26-
string getAnArgument() { result = getArgument(_) or result = getNamedArgument(_) }
26+
string getAnArgument() { result = this.getArgument(_) or result = this.getNamedArgument(_) }
2727

28-
override CS::Location getLocation() { result = getDeclaration().getLocation() }
28+
override CS::Location getLocation() { result = this.getDeclaration().getLocation() }
2929
}
3030

3131
/** A generic attribute to a declaration. */

0 commit comments

Comments
 (0)