Swift: Fill out the upgrade/downgrade scripts.

This commit is contained in:
Geoffrey White
2023-03-29 13:48:31 +01:00
parent d5928e150d
commit fcefd03b14
4 changed files with 26 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
class TypeAliasDecl extends @type_alias_decl {
string toString() { result = "TypeAliasDecl" }
}
from TypeAliasDecl id
select id

View File

@@ -1,2 +1,3 @@
description: <INSERT DESCRIPTION HERE> description: Revert adding TypeAliasDecl.getAliasedType()
compatibility: full|backwards|partial|breaking compatibility: full
type_alias_decls.rel: run type_alias_decls.qlo

View File

@@ -0,0 +1,14 @@
class TypeAliasDecl extends @type_alias_decl {
string toString() { result = "TypeAliasDecl" }
}
class Type extends @type_or_none {
string toString() { result = "Type" }
}
// use the canonical type as an approximation of the aliased type
from TypeAliasDecl td, Type t, Type canonical
where
type_alias_types(t, td) and // td is the declaration of t
types(t, _, canonical) // canonical is the canonical type of t
select td, canonical

View File

@@ -1,2 +1,3 @@
description: <INSERT DESCRIPTION HERE> description: Add TypeAliasDecl.getAliasedType()
compatibility: full|backwards|partial|breaking compatibility: backwards
type_alias_decls.rel: run type_alias_decls.qlo