Skip to content

Branch culling of dead if statement branches is not consistent #21859

@rikkimax

Description

@rikkimax

The following code works in full D, but not in -betterC.

void func() nothrow {
    if (0) {
     	 throw new Exception("");  // Error: cannot use `throw` statements with -betterC
    }
}

This ticket is not necessarily for this exact snippet, but may be implying issues with dmd's glue code, not replicating the logic in blockexit.d for if statements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions