mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-28 01:01:53 +03:00
test Self keyword fails in main function
This commit is contained in:
parent
e916a53ed9
commit
5db13fa904
@ -143,6 +143,15 @@ fn test_member_static_function_undefined() {
|
||||
}
|
||||
|
||||
// Self
|
||||
|
||||
#[test]
|
||||
fn test_self_fail() {
|
||||
let bytes = include_bytes!("self_fail.leo");
|
||||
let program = parse_program(bytes).unwrap();
|
||||
|
||||
expect_compiler_error(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_self_member_pass() {
|
||||
let bytes = include_bytes!("self_member.leo");
|
||||
|
3
compiler/tests/circuits/self_fail.leo
Normal file
3
compiler/tests/circuits/self_fail.leo
Normal file
@ -0,0 +1,3 @@
|
||||
function main() {
|
||||
Self::main();
|
||||
}
|
Loading…
Reference in New Issue
Block a user