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

Some Perl6 programs won't compile #61

Open
jarble opened this issue Mar 4, 2020 · 0 comments
Open

Some Perl6 programs won't compile #61

jarble opened this issue Mar 4, 2020 · 0 comments

Comments

@jarble
Copy link

jarble commented Mar 4, 2020

I tried to run this program with the Perl6 compiler, but it won't compile:


# this example is from Rosetta Code:
# https://rosettacode.org/wiki/99_Bottles_of_Beer#Perl_6

my $b = 99;
 
repeat while --$b {
    say "{b $b} on the wall";
    say "{b $b}";
    say "Take one down, pass it around";
    say "{b $b-1} on the wall";
    say "";
}
 
sub b($b) {
    "$b bottle{'s' if $b != 1} of beer";
}

This is the error from the compiler log:

Compiling.
Emitting javascript.
Finished compilation unit at pos 320 of 320
Error:
{}
Compilation aborted.

Why does this program not compile?

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

1 participant