leo/tests/compiler/function/scope_fail.leo

17 lines
194 B
Plaintext

/*
namespace: Compile
expectation: Fail
*/
function foo() -> field {
return myGlobal;
}
function main() -> field {
const myGlobal = 42field;
const err = foo();
return err;
}