Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing substitution in parameter body #24

Closed
Emoun opened this issue May 21, 2021 · 1 comment
Closed

Missing substitution in parameter body #24

Emoun opened this issue May 21, 2021 · 1 comment
Labels
D-accepted A decision (D) has been made and the issue will be worked on I-bug This issue (I) regards a (potential) bug in the project T-accepted Triage (T): Initial review accepted issue/PR as valid

Comments

@Emoun
Copy link
Owner

Emoun commented May 21, 2021

Situation:

When using parameterized substitution, if a substitution variable is used inside the argument to a substitution, it is not substituted.

Example:

#[duplicate::duplicate(
  refs(type)	fn_name;
  [&type] 	[fn_const];
  [&mut type]	[fn_mut];
)]
fn fn_name(arg: refs([refs([i32])])){}

Expected Behavior:

fn fn_const(arg: &&i32){}
fn fn_mut(arg: &mut &mut i32){}

Actual Behavior:

fn fn_const(arg: &refs([i32])){}
fn fn_mut(arg: &mut refs([i32])){}

Reproduction:

Affected Versions:

0.2.9 and below

Local Environment:

Miscellaneous:

@Emoun Emoun added D-discussion A decision (D) has not been made yet and is open to discussion I-bug This issue (I) regards a (potential) bug in the project labels May 21, 2021
@ghost ghost added the T-new Triage (T): Has yet to be reviewed label May 21, 2021
@Emoun Emoun added T-accepted Triage (T): Initial review accepted issue/PR as valid D-accepted A decision (D) has been made and the issue will be worked on and removed T-new Triage (T): Has yet to be reviewed D-discussion A decision (D) has not been made yet and is open to discussion labels May 21, 2021
@Emoun
Copy link
Owner Author

Emoun commented May 21, 2021

Fixed to be released in next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-accepted A decision (D) has been made and the issue will be worked on I-bug This issue (I) regards a (potential) bug in the project T-accepted Triage (T): Initial review accepted issue/PR as valid
Projects
None yet
Development

No branches or pull requests

1 participant