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
Slurpy params give "Cannot morph a Perl6Scalar." error #255
Comments
From @moritzr30449:
Note that the passing itself doesn't throw an error:
Clearly we need more tests... -- |
From @moritz
Now added test in t/spec/S06-signature/slurpy-params.t which rakudo all -- |
From @bacekOn Fri Aug 22 15:39:26 2008, moritz@casella.verplant.org wrote:
There is small patch, that makes first 6 tests from slurpy-params.t So, question is: "is this patch totally insane or we should add method -- |
From @baceksignature.patchdiff --git a/languages/perl6/src/parser/actions.pm b/languages/perl6/src/parser/actions.pm
index 349f433..8f76c67 100644
--- a/languages/perl6/src/parser/actions.pm
+++ b/languages/perl6/src/parser/actions.pm
@@ -1068,9 +1068,10 @@ method signature($/) {
),
PAST::Op.new(
:inline(
- ' %r = new "Perl6Scalar", %0',
- ' $P0 = get_hll_global ["Bool"], "True"',
- ' setprop %r, "readonly", $P0'
+ ' $P0 = %0."item"()',
+ ' %r = new "Perl6Scalar", $P0',
+ ' $P1 = get_hll_global ["Bool"], "True"',
+ ' setprop %r, "readonly", $P1'
),
PAST::Var.new(
:name($parameter.name()),
@@ -1089,8 +1090,7 @@ method signature($/) {
),
PAST::Op.new(
:inline(
- ' %r = new "Perl6Scalar"',
- ' %r."infix:="(%0)'
+ ' %r = clone %0'
),
PAST::Var.new(
:name($parameter.name()),
|
The RT System itself - Status changed from 'new' to 'open' |
From @bacekHello. There is patch that fixes this error (and makes first 6 tests from -- |
From @baceksignature.patchdiff --git a/languages/perl6/src/parser/actions.pm b/languages/perl6/src/parser/actions.pm
index 349f433..27ddcd0 100644
--- a/languages/perl6/src/parser/actions.pm
+++ b/languages/perl6/src/parser/actions.pm
@@ -1068,7 +1068,8 @@ method signature($/) {
),
PAST::Op.new(
:inline(
- ' %r = new "Perl6Scalar", %0',
+ ' %r = new "Perl6Scalar"',
+ ' %r."infix:="(%0)',
' $P0 = get_hll_global ["Bool"], "True"',
' setprop %r, "readonly", $P0'
),
@@ -1089,8 +1090,7 @@ method signature($/) {
),
PAST::Op.new(
:inline(
- ' %r = new "Perl6Scalar"',
- ' %r."infix:="(%0)'
+ ' %r = clone %0'
),
PAST::Var.new(
:name($parameter.name()),
|
From @bacekHello. There is patch that fixes this error (and makes first 6 tests from -- |
From @baceksignature.patchdiff --git a/languages/perl6/src/parser/actions.pm b/languages/perl6/src/parser/actions.pm
index 349f433..27ddcd0 100644
--- a/languages/perl6/src/parser/actions.pm
+++ b/languages/perl6/src/parser/actions.pm
@@ -1068,7 +1068,8 @@ method signature($/) {
),
PAST::Op.new(
:inline(
- ' %r = new "Perl6Scalar", %0',
+ ' %r = new "Perl6Scalar"',
+ ' %r."infix:="(%0)',
' $P0 = get_hll_global ["Bool"], "True"',
' setprop %r, "readonly", $P0'
),
@@ -1089,8 +1090,7 @@ method signature($/) {
),
PAST::Op.new(
:inline(
- ' %r = new "Perl6Scalar"',
- ' %r."infix:="(%0)'
+ ' %r = clone %0'
),
PAST::Var.new(
:name($parameter.name()),
|
From @pmichaudPatch rejected; the patch appears to eliminate "Perl6Scalar" sub foo($a is copy) { ... } In general I think much of the signature handling in Rakudo needs Thanks! Pm
|
From @jnthnOn Fri Aug 22 15:39:26 2008, moritz@casella.verplant.org wrote:
We now pass all of them apart from the typed arrays one, which is a Thanks, Jonathan |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#58278 (status was 'resolved')
Searchable as RT58278$
The text was updated successfully, but these errors were encountered: