diff --git a/compiler/tests/address/empty.leo b/compiler/tests/address/empty.leo new file mode 100644 index 0000000000..e5c06d0def --- /dev/null +++ b/compiler/tests/address/empty.leo @@ -0,0 +1,3 @@ +function main() { + let owner = address(); +} \ No newline at end of file diff --git a/compiler/tests/address/mod.rs b/compiler/tests/address/mod.rs index b905056baa..32fd58cfe4 100644 --- a/compiler/tests/address/mod.rs +++ b/compiler/tests/address/mod.rs @@ -20,6 +20,14 @@ fn test_invalid() { let _output = expect_compiler_error(program); } +#[test] +fn test_empty() { + let bytes = include_bytes!("empty.leo"); + let syntax_error = parse_program(bytes).is_err(); + + assert!(syntax_error); +} + #[test] fn test_implicit_valid() { let bytes = include_bytes!("implicit_valid.leo");