Skip to content

Commit 855d738

Browse files
committed
WIP fixing bug
1 parent cef8551 commit 855d738

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

ndc_lib/src/interpreter/semantic/analyser.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,19 @@ impl Analyser {
389389
Expression::Int64Literal(_) | Expression::BigIntLiteral(_) => StaticType::Int,
390390
Expression::Float64Literal(_) => StaticType::Float,
391391
Expression::ComplexLiteral(_) => StaticType::Complex,
392-
Expression::Identifier { resolved, name } => self
392+
Expression::Identifier { resolved, name } => {
393+
println!(
394+
"resolving name: {name}, {resolved:?}\n\n{}\n\n{:?}",
395+
self.scope_tree.current_scope_idx, self.scope_tree.scopes
396+
);
397+
self
393398
.scope_tree
394399
.get_type(resolved.unwrap_or_else(|| {
395400
panic!(
396401
"previously mentioned identifier {name} was not resolved during type resolution"
397402
)
398-
})),
403+
}))
404+
}
399405
Expression::Statement(_)
400406
| Expression::While { .. }
401407
| Expression::Break

0 commit comments

Comments
 (0)