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

Cannot idup an Associative array #20564

Open
thewilsonator opened this issue Dec 16, 2024 · 0 comments
Open

Cannot idup an Associative array #20564

thewilsonator opened this issue Dec 16, 2024 · 0 comments
Labels
Druntime:AA Specific to Associative Arrays

Comments

@thewilsonator
Copy link
Contributor

void main() {
    int[int] aa1 = [1:2];
    immutable aa2 = aa1.dup;
}

fails with

onlineapp.d(3): Error: none of the overloads of template `object.idup` are callable using argument types `!()(int[int])`
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(3871):        Candidates are: `idup(T)(T[] a)`
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(3880):                        `idup(T : void)(const(T)[] a)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Druntime:AA Specific to Associative Arrays
Projects
None yet
Development

No branches or pull requests

1 participant