Skip to content
Permalink
Browse files

Fix bug causing incorrect warning when missing an optional argument

  • Loading branch information...
pmurias committed Mar 7, 2019
1 parent 69d88be commit 1ec4f171dd343441a47a2313f115d116864a39b1
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/ForeignCode.pm6
@@ -24,7 +24,7 @@ my class Rakudo::Internals::EvalIdSource {
$lock.protect: { $count++ }
}
}
proto sub EVAL($code is copy where Blob|Cool|Callable, Str() :$lang = 'perl6', PseudoStash :$context, Str() :$filename, *%n) {
proto sub EVAL($code is copy where Blob|Cool|Callable, Str() :$lang = 'perl6', PseudoStash :$context, Str() :$filename = Str, *%n) {
die "EVAL() in Perl 6 is intended to evaluate strings, did you mean 'try'?"
if nqp::istype($code,Callable);
# First look in compiler registry.
@@ -64,7 +64,7 @@ proto sub EVAL($code is copy where Blob|Cool|Callable, Str() :$lang = 'perl6', P
$compiled();
}

multi sub EVAL($code, Str :$lang where { ($lang // '') eq 'Perl5' }, PseudoStash :$context, Str() :$filename) {
multi sub EVAL($code, Str :$lang where { ($lang // '') eq 'Perl5' }, PseudoStash :$context, Str() :$filename = Str) {
my $eval_ctx := nqp::getattr(nqp::decont($context // CALLER::), PseudoStash, '$!ctx');
my $?FILES := $filename // 'EVAL_' ~ Rakudo::Internals::EvalIdSource.next-id;
state $p5;

0 comments on commit 1ec4f17

Please sign in to comment.
You can’t perform that action at this time.