A void call in For filter can't compile

Reference ID

b584484a-4497-4e2b-5e8a-e89c4b6c5bae

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Verse

Summary

In Verse, A void call in For filter can’t compile

Steps to Reproduce

Code

test_device := class(creative_device):
    IncrementSomeVariable()<transacts>:int = 1

    OnBegin<override>()<suspends>:void=
        if:
            1=1
            S := IncrementSomeVariable() #OK
            IncrementSomeVariable() #OK
        then:
            
        for:
            X := 0..1
            S := IncrementSomeVariable() #OK
            IncrementSomeVariable() #Compile Error "Expected an expression that can fail in the 'for' filter expression"
        do:        

Expected Result

All expressions can compile.

Observed Result

Only void call in For filter can’t compile.

Platform(s)

windows

Additional Information.
If IncrementSomeVariable() is changed to failable function, compiled successfully

    #Change to failable function
    IncrementSomeVariable()<transacts><decides>:int = 1

    OnBegin<override>()<suspends>:void=
        if:
            1=1
            S := IncrementSomeVariable[] #OK
            IncrementSomeVariable[] #OK
        then:
            
        for:
            X := 0..1
            S := IncrementSomeVariable[] #OK
            IncrementSomeVariable[] #OK!!!!!!!!!!!!!!!
        do:        

From: Ask Epic : Verse

No good reason. This is a bug related to how for syntax is currently pattern-matched, rather than evaluated in the way MaxVerse describes.