duplicate icon indicating copy to clipboard operation
duplicate copied to clipboard

duplicate_item fails for multiple duplicates but not a single

Open Emoun opened this issue 7 months ago • 0 comments

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

Local Environment:

Miscellaneous:

Emoun avatar May 03 '25 08:05 Emoun