PatternLanguage icon indicating copy to clipboard operation
PatternLanguage copied to clipboard

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

Open AkiSakurai opened this issue 1 year ago • 1 comments

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

AkiSakurai avatar Dec 24 '24 12:12 AkiSakurai

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

paxcut avatar Dec 24 '24 13:12 paxcut