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
22
33class Type extends Generated:: Type {
44 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 }
514}
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
22private import codeql.swift.generated.type.TypeAliasType
33
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