Closed waalge closed 2 months ago
v1.0.26-alpha+6d7b851
nixos
pub fn a(x: Int) { b(x) } fn b(y: Int) { trace cbor.diagnostic((x, y)) x + y }
This type checks and causes a build to panic.
crates/uplc/src/optimize/shrinker.rs:960:67 called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "x", unique: Unique(6) })
Found when the LSP invited me to use a variable not in the scope of the function, but is where function is invoked, which confused me.
Typecheck says this is illegal
Hmm. Looks like we've introduced a regression with the scope in https://github.com/aiken-lang/aiken/pull/922. I know the problem. Good thing we haven't released that version yet 😶 ...
What Git revision are you using?
v1.0.26-alpha+6d7b851
What operating system are you using, and which version?
nixos
Describe what the problem is?
This type checks and causes a build to panic.
Found when the LSP invited me to use a variable not in the scope of the function, but is where function is invoked, which confused me.
What should be the expected behavior?
Typecheck says this is illegal