Skip to content

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

@AkiSakurai

Description

@AkiSakurai
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions