File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ std::optional<codeql::AssociatedTypeDecl> DeclTranslator::translateAssociatedTyp
206206std::optional<codeql::TypeAliasDecl> DeclTranslator::translateTypeAliasDecl (
207207 const swift::TypeAliasDecl& decl) {
208208 if (auto entry = createNamedEntry (decl)) {
209+ entry->aliased_type = dispatcher.fetchLabel (decl.getUnderlyingType ());
209210 fillTypeDecl (decl, *entry);
210211 return entry;
211212 }
Original file line number Diff line number Diff line change @@ -670,7 +670,8 @@ param_decl_property_wrapper_local_wrapped_vars( //dir=decl
670670);
671671
672672type_alias_decls( //dir=decl
673- unique int id: @type_alias_decl
673+ unique int id: @type_alias_decl,
674+ int aliased_type: @type_or_none ref
674675);
675676
676677class_decls( //dir=decl
Original file line number Diff line number Diff line change @@ -324,7 +324,18 @@ class OpaqueTypeDecl(GenericTypeDecl):
324324 opaque_generic_params : list ["GenericTypeParamType" ]
325325
326326class TypeAliasDecl (GenericTypeDecl ):
327- pass
327+ """
328+ A declaration of a type alias to another type. For example:
329+ ```
330+ typealias MyInt = Int
331+ ```
332+ """
333+ aliased_type : Type | doc ("aliased type on the right-hand side of this type alias declaration" ) | desc ("""
334+ For example the aliased type of `MyInt` in the following code is `Int`:
335+ ```
336+ typealias MyInt = Int
337+ ```
338+ """ )
328339
329340class ClassDecl (NominalTypeDecl ):
330341 pass
You can’t perform that action at this time.
0 commit comments