Skip to content

Tests in a semidet loop are compiled incorrectly #499

@pschachte

Description

@pschachte

Both of these loops:

if { (for ?i in 1..10 { unless i > 5 ; fail }) :: !println("nothing in 1..10 is > 5")
   | else :: !println("something in 1..10 is > 5")
}

and

if { (for ?i in 1..10 { if {i > 5:: fail } }) :: !println("nothing in 1..10 is > 5")
   | else :: !println("something in 1..10 is > 5")
}

are compiled so that when the test fails, the loop simply terminates. The generated loop proc does not return a success indicator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions