|
Revision 20490, 381 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 | |
|---|
| 1 | use v6; |
|---|
| 2 | |
|---|
| 3 | use Test; |
|---|
| 4 | |
|---|
| 5 | plan 2; |
|---|
| 6 | |
|---|
| 7 | class Parent {} |
|---|
| 8 | |
|---|
| 9 | my $new_count = 0; |
|---|
| 10 | |
|---|
| 11 | class Child is Parent |
|---|
| 12 | { |
|---|
| 13 | method new ( $Class: ) |
|---|
| 14 | { |
|---|
| 15 | return if $new_count++ > 1; |
|---|
| 16 | return $Class.SUPER::new(); |
|---|
| 17 | } |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | my $child = Child.new; |
|---|
| 21 | |
|---|
| 22 | is( $child.WHAT, 'Child', 'new() should be SUPER-callable' ); |
|---|
| 23 | is( $new_count, 1, |
|---|
| 24 | 'SUPER should not call itself in the absence of a parent method' ); |
|---|