mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
Python: Make TypeParameter extend AstNode
With `AstNode` defined as a union of other classes, we don't get this for free. (Compare with `DictItem`, which is in a similar situation.)
This commit is contained in:
@@ -222,9 +222,16 @@ class StringList extends StringList_ { }
|
||||
class AliasList extends AliasList_ { }
|
||||
|
||||
/** A generic type parameter, as seen in function, class, and type alias definitions. */
|
||||
class TypeParameter extends TypeParameter_ {
|
||||
class TypeParameter extends TypeParameter_, AstNode {
|
||||
/** Gets a textual representation of this element */
|
||||
override string toString() { result = TypeParameter_.super.toString() }
|
||||
|
||||
override AstNode getAChildNode() { none() }
|
||||
|
||||
override Scope getScope() { none() }
|
||||
|
||||
/** Gets the location of this element */
|
||||
override Location getLocation() { result = TypeParameter_.super.getLocation() }
|
||||
}
|
||||
|
||||
/** A list of type parameters */
|
||||
|
||||
Reference in New Issue
Block a user