root/t/oo/class_inheritance_become_infinite_loop.t

Revision 20490, 464 bytes (checked in by Auzon, 8 months ago)

s/use v6-alpha;$/use v6;/;
Also catching a few other mentions of v6-alpha.

  • Property svn:mime-type set to text/plain; charset=UTF-8
  • Property svn:eol-style set to native
Line 
1use v6;
2
3use Test;
4
5plan 1;
6
7my $var = 5;
8
9role B { method x { $var = 3; } }
10
11class T does B { }
12
13class S does B
14{
15        has $.t;
16        method x
17        {
18                "always repeated".say;
19                $.t.x;
20        }
21        method BUILD
22        { $.t = T.new }
23}
24
25# uncomment below after the bug is fixed. As below line will cause infinite loop;
26#S.new.x;
27
28is $var, 3, "Test class inhrited from the same role caused infinite loop bug", :todo<bug>;
Note: See TracBrowser for help on using the browser.