Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error when running script from file #13

Closed
masak opened this issue May 13, 2011 · 1 comment
Closed

Internal error when running script from file #13

masak opened this issue May 13, 2011 · 1 comment

Comments

@masak
Copy link

masak commented May 13, 2011

Running from command line works.

$ ./nqp -e 'say("OH HAI")'
OH HAI

Putting things in a script works but triggers an error message in the module loader.

$ cat q
say("OH HAI");
$ ./nqp q
OH HAI
Cannot take substr outside string
current instr.: 'nqp;ModuleLoader;set_mainline_module' pc 2814 (src/stage2/gen/module_loader.pir:1052)
called from Sub '_block11' pc 63 ((file unknown):36284014)
called from Sub 'nqp;HLL;Compiler;_block1706' pc 36838 (src/stage2/gen/NQPHLL.pir:0)
called from Sub 'nqp;HLL;Compiler;eval' pc 36699 (src/stage2/gen/NQPHLL.pir:11432)
called from Sub 'nqp;HLL;Compiler;_block1955' pc 38739 (src/stage2/gen/NQPHLL.pir:12251)
called from Sub 'nqp;HLL;Compiler;evalfiles' pc 38574 (src/stage2/gen/NQPHLL.pir:12182)
called from Sub 'nqp;HLL;Compiler;command_line' pc 37820 (src/stage2/gen/NQPHLL.pir:11862)
called from Sub 'MAIN' pc 20012 (src/stage2/gen/NQP.pir:4541)
called from Sub '_block11' pc 176 (src/stage2/gen/NQP.pir:78)

Using '--' before the filename makes things work again. o.O

masak@ubuntu:~/ours/nqp$ ./nqp -- q
OH HAI
@arnsholt
Copy link
Contributor

arnsholt commented Oct 5, 2013

Works in latest NQP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants