mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-04 14:13:24 +00:00
Erlang LS identifies functions, types and parameterised macros as `name/arity`, but `/` separates the components of a Serena name path, so `create_user/4` was parsed as "symbol `4` nested inside `create_user`" and could never match -- not even via the name path Serena itself reported for the symbol. Browsing still worked, but find_referencing_symbols, replace_symbol_body and insert_after_symbol were unusable on Erlang functions. Normalize the name to `create_user#4` instead. `#` cannot occur in an unquoted Erlang atom, so it can never collide with a real name, unlike `@`. The arity is kept rather than stripped because it is part of a function's identity in Erlang: create_order/3 and create_order/2 are different functions and may coexist in one module. Also document the "no `/` in symbol names" rule on _normalize_symbol_name, which is what the next backend for such a language needs to know.