We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 96752f0 + e294b8f commit 8ff0a19Copy full SHA for 8ff0a19
swift/ql/lib/codeql/swift/elements/decl/TypeDecl.qll
@@ -1,5 +1,15 @@
1
private import codeql.swift.generated.decl.TypeDecl
2
+private import codeql.swift.generated.type.Type
3
+private import codeql.swift.elements.type.AnyGenericType
4
5
class TypeDecl extends TypeDeclBase {
6
override string toString() { result = this.getName() }
7
+
8
+ TypeDecl getBaseTypeDecl(int i) { result = this.getBaseType(i).(AnyGenericType).getDeclaration() }
9
10
+ TypeDecl getABaseTypeDecl() { result = this.getBaseTypeDecl(_) }
11
12
+ TypeDecl getDerivedTypeDecl(int i) { result.getBaseTypeDecl(i) = this }
13
14
+ TypeDecl getADerivedTypeDecl() { result = this.getDerivedTypeDecl(_) }
15
}
0 commit comments