Test helper predicates for TypeSpec

This commit is contained in:
Owen Mansel-Chan
2025-06-05 10:52:01 +01:00
parent c4a8ac4980
commit 75d9b298b2
2 changed files with 3 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
| main.go:3:6:3:15 | type declaration specifier | status | int | def |
| main.go:5:6:5:20 | type declaration specifier | intlist | []int | alias |
| main.go:3:6:3:15 | type declaration specifier | status | status | main.go:3:13:3:15 | int | int | def |
| main.go:5:6:5:20 | type declaration specifier | intlist | []int | main.go:5:16:5:20 | array type | []int | alias |

View File

@@ -2,4 +2,4 @@ import go
from TypeSpec ts, string kind
where if ts instanceof AliasSpec then kind = "alias" else kind = "def"
select ts, ts.getName(), ts.getTypeExpr().getType().pp(), kind
select ts, ts.getName(), ts.getDeclaredType().pp(), ts.getTypeExpr(), ts.getRhsType().pp(), kind