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
Can't augment class Int #1763
Comments
From @moritz<@moritz_> rakudo: use MONKEY_TYPING; augment class Int { method foo { There are two bugs in here; the first being that method foo is not <@moritz_> rakudo: use MONKEY_TYPING; augment class Integer { method foo |
From @zhuomingliang在 2010-05-15 01:24:44 星期六 时,moritz 写到:
rakudo: use MONKEY_TYPING; augment class Str { method Yes() { 'yes, |
The RT System itself - Status changed from 'new' to 'open' |
From @zhuomingliangInline Patchdiff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm
index 9c7f936..2e60137 100644
--- a/src/Perl6/Actions.pm
+++ b/src/Perl6/Actions.pm
@@ -2297,7 +2297,7 @@ method number:sym<numish>($/) {
}
method numish($/) {
- if $<integer> { make PAST::Val.new( :value($<integer>.ast) ); }
+ if $<integer> { make PAST::Val.new( :value($<integer>.ast),
|
From @zhuomingliangupload the patch |
From @zhuomingliang0001-fixed-75114-Can-t-augment-class-Int.patchFrom 0c1b724f8b9d42403218d2aadd8037db2c79c8f5 Mon Sep 17 00:00:00 2001
From: Jimmy Zhuo <zhuomingliang@yahoo.com.cn>
Date: Sun, 16 May 2010 19:08:51 +0800
Subject: [PATCH] fixed #75114: Can't augment class Int
---
src/Perl6/Actions.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm
index 9c7f936..2e60137 100644
--- a/src/Perl6/Actions.pm
+++ b/src/Perl6/Actions.pm
@@ -2297,7 +2297,7 @@ method number:sym<numish>($/) {
}
method numish($/) {
- if $<integer> { make PAST::Val.new( :value($<integer>.ast) ); }
+ if $<integer> { make PAST::Val.new( :value($<integer>.ast), :returns('Int') ); }
elsif $<dec_number> { make $<dec_number>.ast; }
elsif $<rad_number> { make $<rad_number>.ast; }
else {
@@ -2510,7 +2510,7 @@ method quote_EXPR($/) {
$past := PAST::Stmts.new($past);
}
else {
- $past := PAST::Val.new(:value(~@words[0]), :returns<Str>);
+ $past := PAST::Val.new( :value(~@words[0]), :returns('Str') );
}
}
}
--
1.7.0.4
|
From @moritzI've applied the patch, thank you Jimmy! It does solve the problem in some cases, but not in others. There's a test in t/spec/S04-statements/for.t that still fails (fudged |
From @zhuomingliang在 2010-06-03 12:37:50 星期四 时,moritz 写到:
#?rakudo skip 'class accessing outer lexical' It doesn't work, yeah, and So this one: my $d = ''; for '0' .. '5' { .some_meth_1 }; |
From @zhuomingliang在 2010-06-03 12:37:50 星期四 时,moritz 写到:
Yep, and use MONKEY_TYPING; for '0' .. '5' { .some_meth_1 }; Doesn't work. |
From @felliottHello, This seems to be working now and has tests in S12-class/open.t. The Cheers, |
@felliott - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#75114 (status was 'resolved')
Searchable as RT75114$
The text was updated successfully, but these errors were encountered: