This is an automatically generated mail to inform you that tests are now
available in t/spec/S12-class/inheritance.t
commit 395a0b0e02df40b34795fa94d1e9cdcdecc82369
Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Sat Sep 26 16:23:50 2009 +0000
[t/spec] test for RT #69262
git-svn-id: http://svn.pugscode.org/p...@28419
c213334d-75ef-0310-aa23-eaa082d1ae64
diff --git a/t/spec/S12-class/inheritance.t b/t/spec/S12-class/inheritance.t
index 4260be3..db6f263 100644
--- a/t/spec/S12-class/inheritance.t
+++ b/t/spec/S12-class/inheritance.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 36;
+plan 38;
# L<S12/Classes/An "isa" is just a trait that happens to be another class>
@@ -20,6 +20,10 @@ class Foo::Bar is Foo {
method super_baz ($self:) { return $self.Foo::baz() }
}
+class Unrelated {
+ method something { 'bad' };
+}
+
my $foo_bar = Foo::Bar.new();
isa_ok($foo_bar, Foo::Bar);
@@ -47,6 +51,11 @@ my $fud;
lives_ok { $fud = $foo_bar.getme.fud }, 'chained method dispatch on altered
method';
is($fud, "Foo::Bar::fud", "returned value is correct");
+is $foo_bar.Foo::baz, 'Foo::baz', '$obj.Class::method syntax works';
+#?rakudo todo 'RT 69262'
+dies_ok { $foo_bar.Unrelated::something() },
+ 'Cannot call unrelated method with $obj.Class::method syntax';
+
# See thread "Quick OO .isa question" on p6l started by Ingo Blechschmidt:
# L<"http://www.nntp.perl.org/group/perl.perl6.language/22220">