Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (17 sloc) 0.497 kB
use v6;
use Test;
plan 3;
# L<S12/Semantics of C<bless>/The default BUILD and BUILDALL>
class Foo {
has $.v;
submethod BUILD (Str :$value) {
$!v = $value;
my $obj = value => 'bar' );
is( $obj.v, 'bar',
'BUILD arg declared as named and invoked with literal pair should'
~ ' contain only the pair value' );
isa_ok($obj.v, Str, 'same arg should be of declared type' );
isa_ok($obj, Foo, 'The object was constructed of the right type');
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.