diff --git a/compiler/src/macro_/format.rs b/compiler/src/macro_/format.rs index f5d8292ffd..cc872f5b57 100644 --- a/compiler/src/macro_/format.rs +++ b/compiler/src/macro_/format.rs @@ -1,4 +1,4 @@ -//! Evaluates a macro in a compiled Leo program. +//! Evaluates a formatted string in a compiled Leo program. use crate::{errors::MacroError, program::ConstrainedProgram, GroupType}; use leo_types::FormattedString; diff --git a/compiler/tests/macros/mod.rs b/compiler/tests/macros/mod.rs index 0c85720fa8..7d14bfebdf 100644 --- a/compiler/tests/macros/mod.rs +++ b/compiler/tests/macros/mod.rs @@ -32,6 +32,14 @@ fn test_print_parameter_many() { let _output = get_output(program); } +#[test] +fn test_print_parameter_fail_unknown() { + let bytes = include_bytes!("print_parameter_fail_unknown.leo"); + let program = parse_program(bytes).unwrap(); + + let _err = get_error(program); +} + #[test] fn test_print_parameter_fail_empty() { let bytes = include_bytes!("print_parameter_fail_empty.leo"); diff --git a/compiler/tests/macros/print_parameter_fail_unknown.leo b/compiler/tests/macros/print_parameter_fail_unknown.leo new file mode 100644 index 0000000000..b6f1bb5a8c --- /dev/null +++ b/compiler/tests/macros/print_parameter_fail_unknown.leo @@ -0,0 +1,3 @@ +function main() { + print!("{}", a); +} \ No newline at end of file