[svn:parrot] r42168 - trunk/t/op
coke at svn.parrot.org
coke at svn.parrot.org
Fri Oct 30 01:05:48 UTC 2009
Author: coke
Date: Fri Oct 30 01:05:48 2009
New Revision: 42168
URL: https://trac.parrot.org/parrot/changeset/42168
Log:
Add a test for 41583
Modified:
trunk/t/op/calling.t
Modified: trunk/t/op/calling.t
==============================================================================
--- trunk/t/op/calling.t Fri Oct 30 00:22:51 2009 (r42167)
+++ trunk/t/op/calling.t Fri Oct 30 01:05:48 2009 (r42168)
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 96;
+use Parrot::Test tests => 97;
=head1 NAME
@@ -2481,6 +2481,34 @@
Undef
OUTPUT
+pir_output_is( <<'CODE', <<'OUTPUT', "Tailcall from vtable (Was RT #41583)" );
+
+.sub main :main
+$P1 = newclass "Foo"
+$P2 = new "Foo"
+
+## Should return 2, but doesn't.
+$I1 = elements $P2
+$S1 = $I1
+say $S1
+.end
+
+.namespace ["Foo"]
+
+.sub elements :vtable
+$I0 = 13
+$I1 = 2
+.tailcall identity($I1)
+.end
+
+.sub identity
+.param int arg
+.return (arg)
+.end
+CODE
+2
+OUTPUT
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
More information about the parrot-commits
mailing list