-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Labels
Description
Semantic does not produce a SymbolId for C in declare class C {}.
I believe it should - all BindingIdentifiers should have a SymbolId, and we do produce SymbolIds for other TS-only identifiers e.g. type N = number;.
In this example, only A gets assigned a SymbolId:
class A {}
declare class B {}
export declare class C {}Relevant code:
oxc/crates/oxc_semantic/src/binder.rs
Lines 103 to 118 in ff2a1d4
| fn bind(&self, builder: &mut SemanticBuilder) { | |
| if !self.declare { | |
| let Some(ident) = &self.id else { return }; | |
| let symbol_id = builder.declare_symbol( | |
| ident.span, | |
| &ident.name, | |
| SymbolFlags::Class, | |
| if self.is_declaration() { | |
| SymbolFlags::ClassExcludes | |
| } else { | |
| SymbolFlags::empty() | |
| }, | |
| ); | |
| ident.symbol_id.set(Some(symbol_id)); | |
| } | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
None yet