This commit is contained in:
2026-03-24 13:40:27 +00:00
parent 8c02f505d0
commit 836b280998
10 changed files with 268 additions and 238 deletions
@@ -149,12 +149,13 @@ pub fn compile_project(
for sym in ts.symbols.into_values() {
if let Some(existing) = ms.type_symbols.get(sym.name) {
return Err(DiagnosticBundle::error(
"E_RESOLVE_DUPLICATE_SYMBOL",
format!(
"Duplicate type symbol '{}' in module '{}'",
interner.resolve(existing.name),
module_path
),
Some(existing.span)
existing.span,
).into());
}
let _ = ms.type_symbols.insert(sym);
@@ -162,12 +163,13 @@ pub fn compile_project(
for sym in vs.symbols.into_values() {
if let Some(existing) = ms.value_symbols.get(sym.name) {
return Err(DiagnosticBundle::error(
"E_RESOLVE_DUPLICATE_SYMBOL",
format!(
"Duplicate value symbol '{}' in module '{}'",
interner.resolve(existing.name),
module_path
),
Some(existing.span)
existing.span,
).into());
}
let _ = ms.value_symbols.insert(sym);