Skip to content

Make reactions.go and other similar methods interrupt action block execution #82

@nikvoloshin

Description

@nikvoloshin

For now, the user must ensure by himself that there is no code after reactions.go, otherwise, this code will be executed, moreover, it will be executed before toState action block. Although it breaks reactions.go semantic and documentation that states the following: "Changes the state of scenario and executes it's action block immediately".
For example, such a code:

action {
	reactions.go("somewhere")
	reactions.say("Shouldn't get to this")
}

will produce the output: Shouldn't get to this.

I think, that it's not the desired behaviour and we should think about, for example, making reactions.go and other go-like methods return kotlin.Nothing. It will make user and compiler sure, that current action block execution interrupts after reactions.go

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