Closed p6rt closed 15 years ago
I tried to implement "plan *" for 'no_plan' and this is the minimal test case:
perl6 $ perl6 -e 'my $plan = *; say $plan.isa(Whatever)' Method 'isa' not found for invocant of class 'Whatever' current instr.: '_block14' pc 90 (EVAL_17:45) called from Sub '!UNIT_START' pc 17255 (src/builtins/guts.pir:321) called from Sub 'parrot;PCT;HLLCompiler;eval' pc 950 (src/PCT/HLLCompiler.pir:527) called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1496 (src/PCT/HLLCompiler.pir:787) called from Sub 'parrot;Perl6;Compiler;main' pc 21046 (perl6.pir:158) perl6(54827) malloc: *** error for object 0x3067290: double free *** set a breakpoint in malloc_error_break to debug Segmentation fault
Revision: 35551 $ uname -a Darwin curtis-poes-computer-3.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386
Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
Ovid (>):
I tried to implement "plan *" for 'no_plan' and this is the minimal test case:
perl6 $ perl6 -e 'my $plan = *; say $plan.isa(Whatever)' Method 'isa' not found for invocant of class 'Whatever' [...]
This has nothing to do with the bug, but you'd probably not want to test for *-ness with .isa; use smartmatch (~~) instead.
On the bright side, this already works in Rakudo:
\
The RT System itself - Status changed from 'new' to 'open'
But doesnt Whatever smartmatch anything? Isn't that sort of its raison d'etre?
On 1/15/09, Carl Mäsak \cmasak@​gmail\.com wrote:
Ovid (>):
I tried to implement "plan *" for 'no_plan' and this is the minimal test case:
perl6 $ perl6 -e 'my $plan = *; say $plan.isa(Whatever)' Method 'isa' not found for invocant of class 'Whatever' [...]
This has nothing to do with the bug, but you'd probably not want to test for *-ness with .isa; use smartmatch (~~) instead.
On the bright side, this already works in Rakudo:
\
rakudo: say * ~~ Whatever \ rakudo 35577: OUTPUT«1»
-- Sent from Gmail for mobile | mobile.google.com
Mark J. Reed \markjreed@​gmail\.com
Mark (>), Carl (>>):
This has nothing to do with the bug, but you'd probably not want to test for *-ness with .isa; use smartmatch (~~) instead.
On the bright side, this already works in Rakudo:
But doesnt Whatever smartmatch anything? Isn't that sort of its raison d'etre?
Short answer: you're confusing LHS and RHS of smartmatch.
Long answer:
$ perl6 -e 'say 1 ~~ Whatever' 0 $ perl6 -e 'say * ~~ Whatever' 1
// Carl
On Wed Jan 14 14:02:17 2009, publiustemp-perl6internals2@yahoo.com wrote:
I tried to implement "plan *" for 'no_plan' and this is the minimal test case:
perl6 $ perl6 -e 'my $plan = *; say $plan.isa(Whatever)' Method 'isa' not found for invocant of class 'Whatever'
Ah yes, Whatever was wrongly inheriting from Object, not Any (as S02 says it should), and thus didn't get the .isa helper method declared. Fixed in git 23e8e02 and test added in S02-builtin-datatypes/whatever.t.
Thanks,
Jonathan
@jnthn - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#62364 (status was 'resolved')
Searchable as RT62364$