File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
swift/ql/lib/codeql/swift/elements/type Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,13 @@ private import codeql.swift.generated.type.Type
2
2
3
3
class Type extends Generated:: Type {
4
4
override string toString ( ) { result = this .getName ( ) }
5
+
6
+ /**
7
+ * Gets this type after any type aliases have been resolved. For example in
8
+ * the following code, the underlying type of `MyInt` is `Int`:
9
+ * ```
10
+ * typealias MyInt = Int
11
+ * ```
12
+ */
13
+ Type getUnderlyingType ( ) { result = this }
5
14
}
Original file line number Diff line number Diff line change 1
- // generated by codegen/codegen.py, remove this comment if you wish to edit this file
1
+ private import codeql.swift.elements.type.Type
2
2
private import codeql.swift.generated.type.TypeAliasType
3
3
4
- class TypeAliasType extends Generated:: TypeAliasType { }
4
+ class TypeAliasType extends Generated:: TypeAliasType {
5
+ /**
6
+ * Gets the aliased type of this type alias type.
7
+ *
8
+ * For example the aliased type of `MyInt` in the following code is `Int`:
9
+ * ```
10
+ * typealias MyInt = Int
11
+ * ```
12
+ */
13
+ Type getAliasedType ( ) { none ( ) } // TODO: not yet implemented.
14
+
15
+ override Type getUnderlyingType ( ) { result = this } // TODO: not yet implemented.
16
+ }
You can’t perform that action at this time.
0 commit comments