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

default parameter type check should be compile time when possible #4810

Open
p6rt opened this issue Dec 3, 2015 · 1 comment
Open

default parameter type check should be compile time when possible #4810

p6rt opened this issue Dec 3, 2015 · 1 comment

Comments

@p6rt
Copy link

p6rt commented Dec 3, 2015

Migrated from rt.perl.org#126792 (status was 'new')

Searchable as RT126792$

@p6rt
Copy link
Author

p6rt commented Dec 3, 2015

From @cognominal

According to the test below it seems to be runtime because the error appears after
the BEGIN execution.
The "when possible" proviso is necessary because the provided default parameter may be
run time only.

sub func(@​ok=<a>) { say @​ok.perl}; BEGIN { say 'hi'}; func
hi
Type check failed in binding @​ok; expected Positional but got Str
  in sub func at <unknown file>​:1
  in block <unit> at <unknown file>​:1

$perl6 -v
This is rakudo version 2015.11-167-g235d085 built on MoarVM version 2015.11-19-g623eadf implementing Perl v6.b.

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