Skip to content

Unknown label SyntaxError for labels after the return statement #30

@mcorne

Description

@mcorne

I get the following exception when I run the program below:
Exception has occurred: SyntaxError
Unknown label 'a'

from goto import with_goto
@with_goto
def main(x):
    if x == 0:
        goto.a
    return x
    label.a
    x += 1
    return x

Exception has occurred: SyntaxError
Unknown label 'a'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions