Skip to content

Commit e5d090c

Browse files
authored
Merge pull request github#12671 from asgerf/ql/class-type
QL: Make Class.getType() only return ClassType
2 parents 9a34a7b + 7b49510 commit e5d090c

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ class Class extends TClass, TypeDeclaration, ModuleDeclaration {
972972
}
973973

974974
/** Gets the class type defined by this class declaration. */
975-
Type getType() { result.getDeclaration() = this }
975+
ClassType getType() { result.getDeclaration() = this }
976976

977977
override AstNode getAChild(string pred) {
978978
result = super.getAChild(pred)

ql/ql/test/type/type.expected

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
| Test.qll:4:15:4:18 | this | Test.qll:3:7:3:13 | Strings |
2-
| Test.qll:4:15:4:18 | this | Test.qll:3:7:3:13 | Strings.Strings |
3-
| Test.qll:4:15:4:18 | this | Test.qll:3:7:3:13 | Strings.extends |
42
| Test.qll:4:22:4:76 | Set | file://:0:0:0:0 | string |
53
| Test.qll:4:23:4:24 | String | file://:0:0:0:0 | string |
64
| Test.qll:4:27:4:29 | String | file://:0:0:0:0 | string |
@@ -13,8 +11,6 @@
1311
| Test.qll:4:66:4:69 | String | file://:0:0:0:0 | string |
1412
| Test.qll:4:72:4:75 | String | file://:0:0:0:0 | string |
1513
| Test.qll:8:14:8:17 | this | Test.qll:7:7:7:12 | Floats |
16-
| Test.qll:8:14:8:17 | this | Test.qll:7:7:7:12 | Floats.Floats |
17-
| Test.qll:8:14:8:17 | this | Test.qll:7:7:7:12 | Floats.extends |
1814
| Test.qll:8:21:8:70 | Set | file://:0:0:0:0 | float |
1915
| Test.qll:8:22:8:24 | Float | file://:0:0:0:0 | float |
2016
| Test.qll:8:27:8:29 | Float | file://:0:0:0:0 | float |
@@ -35,14 +31,10 @@
3531
| Test.qll:13:45:13:49 | AddExpr | file://:0:0:0:0 | float |
3632
| Test.qll:13:49:13:49 | b | Test.qll:7:7:7:12 | Floats |
3733
| Test.qll:16:12:16:15 | this | Test.qll:15:7:15:10 | Base |
38-
| Test.qll:16:12:16:15 | this | Test.qll:15:7:15:10 | Base.Base |
39-
| Test.qll:16:12:16:15 | this | Test.qll:15:7:15:10 | Base.extends |
4034
| Test.qll:16:19:16:23 | String | file://:0:0:0:0 | string |
4135
| Test.qll:18:15:18:20 | result | file://:0:0:0:0 | int |
4236
| Test.qll:18:24:18:24 | Integer | file://:0:0:0:0 | int |
4337
| Test.qll:22:11:22:14 | this | Test.qll:21:7:21:9 | Sub |
44-
| Test.qll:22:11:22:14 | this | Test.qll:21:7:21:9 | Sub.Sub |
45-
| Test.qll:22:11:22:14 | this | Test.qll:21:7:21:9 | Sub.extends |
4638
| Test.qll:22:18:22:22 | String | file://:0:0:0:0 | string |
4739
| Test.qll:24:15:24:20 | result | file://:0:0:0:0 | int |
4840
| Test.qll:24:24:24:33 | Super | Test.qll:15:7:15:10 | Base |

0 commit comments

Comments
 (0)