Skip to content

Conversation

@rainers
Copy link
Member

@rainers rainers commented Nov 21, 2025

Fail gracefully with empty declaration.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @rainers!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#22126"

Copy link
Member

@schveiguy schveiguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it passes CI, probably good.

@ibuclaw
Copy link
Member

ibuclaw commented Nov 21, 2025

Judging from the errors, this ought to be at the top of the visit method.

    override void visit(TypeInfoAssociativeArrayDeclaration ti)
    {
        if (ti.semanticRun >= PASS.semantic3)
            return;
        ti.semanticRun = PASS.semantic3;

@rainers
Copy link
Member Author

rainers commented Nov 21, 2025

Judging from the errors, this ought to be at the top of the visit method.

Good point, added.

@thewilsonator thewilsonator merged commit 4d0fc73 into dlang:master Nov 21, 2025
54 of 55 checks passed
tmpl.minst = sc2._module.importedFrom; // ensure it gets emitted
if (!e.isErrorExp())
{
assert(e.isVarExp() && e.type.isTypeFunction());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just realised that this will still trigger an assert and ICE if druntime is seriously mismatched with the compiler by declaring these fields but of a different type.

class TypeInfo_AssociativeArray
{
    alias aaOpEqual(K, V) = () => false;
    alias aaGetHash(K, V) = () => 0;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants