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

ICE on final switch forward referencing its enum #20867

Open
dkorpel opened this issue Feb 14, 2025 · 0 comments
Open

ICE on final switch forward referencing its enum #20867

dkorpel opened this issue Feb 14, 2025 · 0 comments
Labels
Severity:ICE Internal Compiler Error

Comments

@dkorpel
Copy link
Contributor

dkorpel commented Feb 14, 2025

This results in a segfault:

enum E
{
    a = 3,
    b = () {
        E e;
        final switch (e)
        {
            case E.a: break;
        }
        return 4;
    } ()
}
src/dmd/statementsem.d:1966 void dmd.statementsem.statementSemanticVisit(dmd.statement.Statement, dmd.dscope.Scope*).visitSwitch(dmd.statement.SwitchStatement) [0x5f403ee2d915]
src/dmd/statement.d:1886 void dmd.statementsem.statementSemanticVisit(dmd.statement.Statement, dmd.dscope.Scope*).visit.VisitStatement(dmd.statement.Statement) [0x5f403ee339c3]
src/dmd/statementsem.d:3685 dmd.statement.Statement dmd.statementsem.statementSemanticVisit(dmd.statement.Statement, dmd.dscope.Scope*) [0x5f403ee2695f]
@dkorpel dkorpel added the Severity:ICE Internal Compiler Error label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Severity:ICE Internal Compiler Error
Projects
None yet
Development

No branches or pull requests

1 participant