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

_aaRange cannot be interpreted at compile time, because it has no available source code #17216

Open
dlangBugzillaToGithub opened this issue Jul 12, 2024 · 0 comments
Labels
Druntime:AA Specific to Associative Arrays Druntime Specific to druntime OS:Linux P1 Severity:minor

Comments

@dlangBugzillaToGithub
Copy link

Jeremy Baxter reported this on 2024-07-12T04:54:14Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=24658

Description

Associative arrays cannot be iterated over at compile time. This is because the implementation of the range interface for AAs is private.

    enum range = ["a": "b"].byKey();

    void main()
    {
    }

This code fails on DMD 2.108.0 with:

    object.d(3130): Error: `_aaRange` cannot be interpreted at compile time, because it has no available source code
@thewilsonator thewilsonator added Druntime Specific to druntime Druntime:AA Specific to Associative Arrays and removed Arch:x86_64 Issues specific to x86_64 labels Dec 8, 2024
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 Druntime Specific to druntime OS:Linux P1 Severity:minor
Projects
None yet
Development

No branches or pull requests

2 participants