duplicate
duplicate copied to clipboard
duplicate_item fails for multiple duplicates but not a single
Situation:
I was trying to use duplicate_item on code that used a combination of nested substitute! and more duplicate!.
Reproduction:
This code works as expected:
#[duplicate_item(
name inputs;
[multiply_carry] [2];
// [square] [1]
)]
fn name()
{
substitute! ( [
sub [ int, ]
]
test_arithmetic_instruction(
duplicate! (
[
int ;
[32];
]
sub
)
)
;
)
}
However, uncommenting the square line gives the error: cannot find value int in this scope
Expected Behavior:
Should have worked with the two duplicates
Actual Behavior:
gives the error: cannot find value int in this scope
Affected Versions:
2.0.0