Include ModuleDecl::ExportNamed

This commit is contained in:
Andrew Morris
2023-03-24 12:47:28 +11:00
parent 5f5398b566
commit d3391028ba
2 changed files with 43 additions and 3 deletions

View File

@@ -410,10 +410,15 @@ impl ModuleCompiler {
}
None => match self.scope_analysis.lookup(&OwnerId::Module, &orig_name) {
Some(Value::Pointer(p)) => Some(p),
_ => {
lookup_result => {
self.diagnostics.push(Diagnostic {
level: DiagnosticLevel::InternalError,
message: format!("Definition for {} should have been in scope", orig_name),
message: format!(
"{} should have been a pointer, but it was {:?}, ref: {:?}",
orig_name,
lookup_result,
self.scope_analysis.refs.get(&orig_name.span)
),
span: named.orig.span(),
});