mirror of
https://github.com/github/codeql.git
synced 2026-02-08 03:01:10 +01:00
better support for getType on super
This commit is contained in:
@@ -1765,8 +1765,7 @@ class Super extends TSuper, Expr {
|
||||
override string getAPrimaryQlClass() { result = "Super" }
|
||||
|
||||
override Type getType() {
|
||||
exists(TypeExpr te | ref.getChild(0) = toQL(te) | result = te.getResolvedType())
|
||||
// TODO: Also resolve the type when there is no TypeExpr.
|
||||
exists(MemberCall call | call.getBase() = this | result = call.getTarget().getDeclaringType())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,4 +50,5 @@
|
||||
| Test.qll:24:24:24:33 | Super | Test.qll:15:1:19:1 | Base |
|
||||
| Test.qll:24:24:24:39 | MemberCall | file://:0:0:0:0 | int |
|
||||
| Test.qll:26:16:26:21 | result | file://:0:0:0:0 | int |
|
||||
| Test.qll:26:25:26:29 | Super | Test.qll:15:1:19:1 | Base |
|
||||
| Test.qll:26:25:26:35 | MemberCall | file://:0:0:0:0 | int |
|
||||
|
||||
Reference in New Issue
Block a user