Skip to content

Commit

Permalink
Toggle check order to match spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaj committed Oct 12, 2024
1 parent 2268ee1 commit d856867
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rsass/src/variablescope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,14 @@ impl Scope {
let module = self
.get_module(&modulename)
.ok_or(ScopeError::NoModule(modulename))?;
// Refuse to declare new var from outside module:
let _check_existence = module.get(&name)?;
if module
.get_local_or_none(&Name::from_static("@scope_name@"))
.is_some()
{
return Err(ScopeError::ModifiedBuiltin);
} else {
// Refuse to declare new var from outside module:
let _check_existence = module.get(&name)?;
return module.set_variable(name, val, default, global);
}
}
Expand Down
1 change: 0 additions & 1 deletion rsass/tests/spec/core_functions/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ mod error {
}

#[test]
#[ignore] // wrong error
fn set_variable() {
let runner = runner().with_cwd("set_variable");
assert_eq!(
Expand Down

0 comments on commit d856867

Please sign in to comment.