test Self keyword fails in main function

This commit is contained in:
collin 2020-09-07 22:07:26 -07:00
parent e916a53ed9
commit 5db13fa904
2 changed files with 12 additions and 0 deletions

View File

@ -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");

View File

@ -0,0 +1,3 @@
function main() {
Self::main();
}