Skip to content

Invalid_argument(Array.get) from nekoc #184

@btiffin

Description

@btiffin

This should be infinite loop code, I think, while experimenting with Neko programming.

prompt$ cat gotos.neko
$print("start");
$goto(next);

$print("skip");

next:
$print("continue");
$goto(end);

$print("skip");

end: 
$print("end");

$goto(next);

Instead, the VM translation fails

prompt$ nekoc gotos.neko
Called from neko/Main.nml line 153 
Called from core/Args.nml line 57
Called from neko/Main.nml line 68
Called from core/Array.nml line 120
Called from neko/Bytecode.nml line 320
Called from core/Core.nml line 179
Called from core/Core.nml line 212
Exception : Invalid_argument(Array.get)

Fedora 27, from packages nekovm, nekovm-devel 2.2.0-4 x86_64

Replace the last $goto and all goes well.

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