Skip to content
This repository
tag: v8.0
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 26 lines (20 sloc) 0.316 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
use v6;

class Obj {
    has $.x;
    has $.y;
}

class Main {

    say '1..2';

    my $x := 0;
    my $y := 0;
    my $obj := ::Obj( x => 1, y => 2 );
    ::Obj( :$x, :$y ) := $obj;
    if $x != 1 {
        print 'not '
    };
    say 'ok ', $x;
    if $y != 2 {
        print 'not '
    };
    say 'ok ', $y;

}
Something went wrong with that request. Please try again.