diff --git a/swift/downgrades/e646f9e0308ec7135c83c0fdf96896d2737a8013/type_alias_decls.ql b/swift/downgrades/e646f9e0308ec7135c83c0fdf96896d2737a8013/type_alias_decls.ql new file mode 100644 index 00000000000..72f89e3946d --- /dev/null +++ b/swift/downgrades/e646f9e0308ec7135c83c0fdf96896d2737a8013/type_alias_decls.ql @@ -0,0 +1,6 @@ +class TypeAliasDecl extends @type_alias_decl { + string toString() { result = "TypeAliasDecl" } +} + +from TypeAliasDecl id +select id diff --git a/swift/downgrades/e646f9e0308ec7135c83c0fdf96896d2737a8013/upgrade.properties b/swift/downgrades/e646f9e0308ec7135c83c0fdf96896d2737a8013/upgrade.properties index 64da53384a5..31ffe35bf1c 100644 --- a/swift/downgrades/e646f9e0308ec7135c83c0fdf96896d2737a8013/upgrade.properties +++ b/swift/downgrades/e646f9e0308ec7135c83c0fdf96896d2737a8013/upgrade.properties @@ -1,2 +1,3 @@ -description: -compatibility: full|backwards|partial|breaking +description: Revert adding TypeAliasDecl.getAliasedType() +compatibility: full +type_alias_decls.rel: run type_alias_decls.qlo diff --git a/swift/ql/lib/upgrades/c2f01f2beb67e5a57e9df9b6d1c51e35e8d5b0a2/type_alias_decls.ql b/swift/ql/lib/upgrades/c2f01f2beb67e5a57e9df9b6d1c51e35e8d5b0a2/type_alias_decls.ql new file mode 100644 index 00000000000..4b5ecd00925 --- /dev/null +++ b/swift/ql/lib/upgrades/c2f01f2beb67e5a57e9df9b6d1c51e35e8d5b0a2/type_alias_decls.ql @@ -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 diff --git a/swift/ql/lib/upgrades/c2f01f2beb67e5a57e9df9b6d1c51e35e8d5b0a2/upgrade.properties b/swift/ql/lib/upgrades/c2f01f2beb67e5a57e9df9b6d1c51e35e8d5b0a2/upgrade.properties index 64da53384a5..301f7bb8899 100644 --- a/swift/ql/lib/upgrades/c2f01f2beb67e5a57e9df9b6d1c51e35e8d5b0a2/upgrade.properties +++ b/swift/ql/lib/upgrades/c2f01f2beb67e5a57e9df9b6d1c51e35e8d5b0a2/upgrade.properties @@ -1,2 +1,3 @@ -description: -compatibility: full|backwards|partial|breaking +description: Add TypeAliasDecl.getAliasedType() +compatibility: backwards +type_alias_decls.rel: run type_alias_decls.qlo