Skip to content

LLVM error with "break" in loop condition #892

Closed
@jruderman

Description

@jruderman
fn int_id(x: int) -> int { x }
fn main() { while int_id(break) { } }

Result:

Assertion failed: (getCondition()->getType()->isIntegerTy(1) && "May only branch on boolean predicates!"), function AssertOK, file Instructions.cpp, line 730.

Expected:

error: Break outside a loop (?)

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