File tree Expand file tree Collapse file tree
unified/ql/lib/codeql/unified/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ private class IdentifierPotentialLocalNameAccess extends PotentialLocalNameAcces
513513}
514514
515515private class SuperPotentialLocalNameAccess extends PotentialLocalNameAccessImpl , SuperExpr {
516- override string getName ( ) { result = any ( NameBindingPlugin p ) .getSuperLocalName ( ) }
516+ override string getName ( ) { result = any ( NameBindingPlugin p ) .getSuperLocalName ( this ) }
517517}
518518
519519/** Gets the implicitly-declared variable through which the given callable refers to its receiver. */
Original file line number Diff line number Diff line change @@ -69,10 +69,10 @@ class NameBindingPlugin extends Unit {
6969 string getImplicitReceiverParameterName ( Callable callable ) { none ( ) }
7070
7171 /**
72- * Gets the name to be used when resolving `super` expressions, for example
73- * `this` or `self`.
72+ * Gets the name to be used when resolving `super`, for example `this` or `self`.
7473 */
75- string getSuperLocalName ( ) { none ( ) }
74+ bindingset [ se]
75+ string getSuperLocalName ( SuperExpr se ) { none ( ) }
7676
7777 /**
7878 * Gets the name through which static members of the enclosing class `cls` can be
Original file line number Diff line number Diff line change @@ -107,7 +107,8 @@ class NameBindingPluginSwift extends NameBindingPlugin {
107107 result = "self"
108108 }
109109
110- override string getSuperLocalName ( ) { result = "self" }
110+ bindingset [ se]
111+ override string getSuperLocalName ( SuperExpr se ) { exists ( se ) and result = "self" }
111112
112113 bindingset [ cls]
113114 override string getStaticSelfName ( ClassLikeDeclaration cls ) { exists ( cls ) and result = "Self" }
You can’t perform that action at this time.
0 commit comments