Skip to content

Commit

Permalink
Include references to known named objects
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Mar 5, 2024
1 parent 066a419 commit 7c88b77
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions src/code_info/t_atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1698,20 +1698,6 @@ pub fn populate_atomic_type(
force,
);
}
TAtomic::TNamedObject {
type_params: Some(ref mut type_params),
..
} => {
for type_param in type_params {
populate_union_type(
type_param,
codebase_symbols,
reference_source,
symbol_references,
force,
);
}
}
TAtomic::TTypeAlias {
type_params: Some(ref mut type_params),
..
Expand Down Expand Up @@ -1751,6 +1737,29 @@ pub fn populate_atomic_type(
}
}
}
TAtomic::TNamedObject {
name,
type_params: Some(ref mut type_params),
..
} => {
for type_param in type_params {
populate_union_type(
type_param,
codebase_symbols,
reference_source,
symbol_references,
force,
);
}

match reference_source {
ReferenceSource::Symbol(in_signature, a) => {
symbol_references.add_symbol_reference_to_symbol(*a, *name, *in_signature)
}
ReferenceSource::ClasslikeMember(in_signature, a, b) => symbol_references
.add_class_member_reference_to_symbol((*a, *b), *name, *in_signature),
}
}
TAtomic::TReference {
ref name,
ref mut type_params,
Expand Down

0 comments on commit 7c88b77

Please sign in to comment.