leo/tests/compiler/function/scope_fail.leo

17 lines
194 B
Plaintext
Raw Normal View History

2021-05-05 18:29:44 +03:00
/*
namespace: Compile
expectation: Fail
*/
2020-07-08 05:53:37 +03:00
function foo() -> field {
return myGlobal;
}
function main() -> field {
const myGlobal = 42field;
const err = foo();
2021-05-05 18:29:44 +03:00
return err;
2021-05-05 18:29:44 +03:00
}