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
206
206
std::optional<codeql::TypeAliasDecl> DeclTranslator::translateTypeAliasDecl (
207
207
const swift::TypeAliasDecl& decl) {
208
208
if (auto entry = createNamedEntry (decl)) {
209
+ entry->aliased_type = dispatcher.fetchLabel (decl.getUnderlyingType ());
209
210
fillTypeDecl (decl, *entry);
210
211
return entry;
211
212
}
Original file line number Diff line number Diff line change @@ -670,7 +670,8 @@ param_decl_property_wrapper_local_wrapped_vars( //dir=decl
670
670
);
671
671
672
672
type_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
674
675
);
675
676
676
677
class_decls( //dir=decl
Original file line number Diff line number Diff line change @@ -324,7 +324,18 @@ class OpaqueTypeDecl(GenericTypeDecl):
324
324
opaque_generic_params : list ["GenericTypeParamType" ]
325
325
326
326
class 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
+ """ )
328
339
329
340
class ClassDecl (NominalTypeDecl ):
330
341
pass
You can’t perform that action at this time.
0 commit comments