Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test nextwith() in .new method
  • Loading branch information
moritz committed Oct 26, 2011
1 parent f1568a4 commit be0ff5f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S12-construction/new.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 21;
plan 22;

class Parent {
has $.x;
Expand Down Expand Up @@ -97,6 +97,16 @@ is $o.x, 5, '... worked for the class Parent (other order)';
'multi-constructor class alternate default named constructor';
}

# RT #68558
{
class RT68558 {
has $.foo;
method new($foo) { nextwith(:$foo) }
}
is RT68558.new('x').foo, 'x', 'Can call nextwith in .new';

}

done;

# vim: ft=perl6

0 comments on commit be0ff5f

Please sign in to comment.