-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
The following produces an invalid output, the reason being that the compiler always adds variables declaration for the return values of inlined calls, while it should not if the variable has already been declared before.
#[test]
fn bug() {
let program = r#"
fn main() {
x = func();
return;
}
fn func() -> 1 {
var a;
if 0 == 0 {
a = aux();
}
return a;
}
fn aux() inline -> 1 {
return 1;
}
"#;
compile_and_run(program.to_string(), (&[], &[]), DEFAULT_NO_VEC_RUNTIME_MEMORY, false);
}
Metadata
Metadata
Assignees
Labels
No labels