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

sub 'if' hasn't been declared #2

Open
LLFourn opened this issue Jul 23, 2017 · 2 comments
Open

sub 'if' hasn't been declared #2

LLFourn opened this issue Jul 23, 2017 · 2 comments

Comments

@LLFourn
Copy link
Contributor

LLFourn commented Jul 23, 2017

$spit eval 'if Foo { }'
ERROR while compiling eval: Sub 'if' hasn't been declared.
eval:0
➧if Foo { }

(Foo is a non existant symbol). When doing this in rakudo you get:

$ perl6 -e 'if Foo { }'
===SORRY!===
Function 'Foo' needs parens to avoid gobbling block (or perhaps it's a class that's not declared or available in this scope?)
at -e:1
------> if Foo { }⏏<EOL>
Missing block (apparently claimed by 'Foo')
at -e:1
------> if Foo { }⏏<EOL>
@tonyyyye
Copy link

maybe you need parenthesis
try

if (Foo) {}

@LLFourn
Copy link
Contributor Author

LLFourn commented Mar 19, 2018

No doubt. But this ticket is about the bad error message in spit 😛

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

No branches or pull requests

2 participants