Skip to content

[REG 2.112.0] Duplicate __aaget declaration for simple expression with associative array #23182

@vindexbit

Description

@vindexbit
void main() {
    int[][string] aarr;
    aarr["key"].length++;
}

Compilation fails:

../probe/bug_aaget.d(3): Error: declaration `bug_aaget.main.__aaget3` is already defined
    aarr["key"].length++;
    ^
../probe/bug_aaget.d(3):        `variable` `__aaget3` is defined here
    aarr["key"].length++;
    ^

Version 2.111.0 didn't have this fail. Unfortunately, the ldc2 and gdc compilers were too quick to incorporate the changes from 2.112+.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions