mirror of
https://github.com/SpaceManiac/SpacemanDMM.git
synced 2025-12-23 05:36:47 +00:00
Add variable name to const-evaluation error
This commit is contained in:
parent
a01f4116d6
commit
299f142b05
1 changed files with 1 additions and 1 deletions
|
|
@ -840,7 +840,7 @@ impl<'a> ConstantFolder<'a> {
|
|||
while let Some(ty) = idx {
|
||||
let location = self.location;
|
||||
if self.tree.is_none() {
|
||||
return Err(self.error("cannot reference variables in this context"));
|
||||
return Err(self.error(format!("cannot reference variable {:?} in this context", ident)));
|
||||
}
|
||||
let tree = self.tree.as_mut().unwrap();
|
||||
match constant_ident_lookup(tree, ty, &ident, must_be_const)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue