Skip to content

Commit ce47110

Browse files
committed
Swift: QLDoc getCanonicalType.
1 parent 4920c7f commit ce47110

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

swift/schema.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ class AstNode(Locatable):
7777
@ql.hideable
7878
class Type(Element):
7979
name: string
80-
canonical_type: "Type"
80+
canonical_type: "Type" | desc("""
81+
This is the unique type we get after resolving aliases and desugaring. For example, given
82+
```
83+
typealias MyInt == Int
84+
```
85+
then `[MyInt?]` has the canonical type `Array<Optional<Int>>`.
86+
""")
8187

8288
@group("decl")
8389
class Decl(AstNode):

0 commit comments

Comments
 (0)