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

Incorrect evaluation occurs when a local variable name collides with the template argument of an instantiated template parameter. #144

Open
AkiSakurai opened this issue Dec 24, 2024 · 1 comment

Comments

@AkiSakurai
Copy link
Contributor

struct array<auto count> {
    u32 value [count];
};


struct root<type> {
    u8 size; 
    type a;
};


u8 size@1;

using a1 = array<size>;
root<a1> rot @ 0;

The template parameter size in array should refer to the template argument, not the local variable inside root struct.

Screenshot 2024-12-24 at 8 08 56 PM
@paxcut
Copy link
Contributor

paxcut commented Dec 24, 2024

There is a similar issue posted in the ImHex main repository here where the topic is discussed to some extent but was not resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants