[perl #69999] tests available
This is an automatically generated mail to inform you that tests are now available in at least one of these files: AUTHORS, t/spec/S29-any/isa.t commit 8000490d34a3e1073e29c05f57df81ebf06b4308 Author: jsut j...@c213334d-75ef-0310-aa23-eaa082d1ae64 Date: Sat Oct 24 14:53:23 2009 + Tests for RT #6, .isa on classes with colons in their names git-svn-id: http://svn.pugscode.org/p...@28892 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/AUTHORS b/AUTHORS index 9f3f4d8..44a2610 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,6 +7,7 @@ Aaron ajs Sherman (ASHER) Aankhola Encorporated(AANKHEN) Adam alias Kennedy (ADAMK) Adam Preble +Adam jsut Prime(APRIME) Adrian adehohum Taylor Adriano Ferreira (FERREIRA) Adrian Auzon Kreher diff --git a/t/spec/S29-any/isa.t b/t/spec/S29-any/isa.t index 88a0361..7e21a0d 100644 --- a/t/spec/S29-any/isa.t +++ b/t/spec/S29-any/isa.t @@ -18,7 +18,7 @@ LS29/Any/=item isa/ =end kwid -plan 11; +plan 15; { # invocant notation my @arr = 1 2 3 4; @@ -59,4 +59,17 @@ plan 11; ok(![1, 2, 3, 4].isa(Hash), '... [1, 2, 3, 4].isa(Hash) fail predicably'); } +class Thing {}; +{ +my $thing = Thing.new(); +ok($thing.isa(Thing)); +ok($thing.isa(Thing)); +} +class Thing::something {}; +{ +my $thing = Thing::something.new(); +ok($thing.isa(Thing::something)); +ok($thing.isa(Thing::something)); +} + # vim: ft=perl6
LLVM/Clang and diagnostics
This might be a useful point of reference for thinking about diagnostics and what's important to the developer working with Perl 6 in the future: http://clang.llvm.org/diagnostics.html
Re: unusual invocants
On Wed, 21 Oct 2009, Ben Morrow wrote: The most important detail here is that the *class* gets to pick which imported methods need to be wrapped. [but] What this doesn't fix is that some other code (outside the class) will be expecting C::x to have T1::x semantics, and some will be expecting it to have T2::x semantics. If these are contradictory, there is no way to write an x which works. That's where the 'hats' idea comes in Sounds like going back to static typing -- which does sometimes have some advantages. One way to implement at would be to use proxy objects, which only do one of the roles (by passing them through to the appropriate methods on the original object). This could be done transparently to formal parameters, so that when they're used locally they would dispatch the expected method based on the locally declared type for the object. -Martin
[perl #69991] Exceptions from io.pir not being properly thrown
# New Ticket Created by Mark Montague # Please include the string: [perl #69991] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=69991 Exceptions from src/builtins/io.pir (and possibly elsewhere) are not being properly thrown: diff --git a/src/builtins/io.pir b/src/builtins/io.pir index 69cdf88..10fe7e8 100644 --- a/src/builtins/io.pir +++ b/src/builtins/io.pir @@ -172,6 +172,7 @@ true value is returned. failure: pop_eh +print parrot exception for chdir caught\n .tailcall '!FAIL'('Unable to change to directory ', newdir, '') .end $ ./perl6 -e 'try { chdir(/no/such/directory); CATCH { say caught; } }' parrot exception for chdir caught $ The above should also have said caught but did not. The same thing happens for mkdir(): $ ./perl6 -e 'try { mkdir(/no/such/directory); CATCH { say caught; } }' $ However, this works: $ ./perl6 -e 'try { fail(oh noes); CATCH { say caught; } }' caught $ Extra info: $ git pull Already up-to-date. $ git rev-parse HEAD 501b4fb08ece44433e2bbedba0ef13e3e523f883 $ parrot_config VERSION # built and installed separately from rakudo 1.7.0 Mark Montague markm...@umich.edu
[perl #69999] .isa(Obj,Str) doesn't work correctly if the Str contains colons.
# New Ticket Created by adam.pr...@utoronto.ca # Please include the string: [perl #6] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=6 The attached patch adds 4 more tests to 07-isa.t. test #6 currently fails. Adam diff --git a/t/01-sanity/07-isa.t b/t/01-sanity/07-isa.t index 9fc9a2f..0b706ff 100644 --- a/t/01-sanity/07-isa.t +++ b/t/01-sanity/07-isa.t @@ -1,7 +1,7 @@ use v6; -say 1..3; +say 1..7; { my $string = Pugs; @@ -17,3 +17,15 @@ say 1..3; my $code = { 42 }; if $code.isa(Code) { say ok 3 } else { say not ok 3 } } +class Thing {}; +{ +my $thing = Thing.new(); +if $thing.isa(Thing) { say ok 4 } else { say not ok 4 } +if $thing.isa(Thing) { say ok 5 } else { say not ok 5 } +} +class Thing::something {}; +{ +my $thing = Thing::something.new(); +if $thing.isa(Thing::something) { say ok 6 } else { say not ok 6 } +if $thing.isa(Thing::something) { say ok 7 } else { say not ok 7 } +}