Files
Brummel adce3a6818 Fix: Simplify scoping tests
Removes outdated tests for macro expansion, destructuring, and if branch
scope leaks. These tests were either superseded by newer, more accurate
tests or are no longer relevant to the current implementation of the
compiler's scoping rules. The remaining test correctly asserts that
defining the same variable in different 'if' branches is functional.
2026-03-27 09:26:30 +01:00

14 lines
392 B
Rust

use myc::ast::environment::Environment;
#[test]
fn test_if_branch_redefinition_works() {
let env = Environment::new();
let source = "(if true (do (def x 10) x) (do (def x 20) x))";
let result = env.compile(source).into_result();
assert!(
result.is_ok(),
"Defining the same variable in different 'if' branches should work: {:?}",
result.err()
);
}