leo/tests/compiler/function/scope_fail.leo
2022-10-05 16:53:49 -07:00

19 lines
264 B
Plaintext

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