#!/usr/bin/env perl6 use v6; class Term::Choose { has Str $.prompt is rw = 'Your Choice'; has Int @.mark is rw; method choose ( Array $orig_list, %opt? ) { for %opt.pairs { self."{.key}"() = .value; } } } my $n = Term::Choose.new(); $n.choose( [ 1 .. 10 ], { prompt => 'BBBBB', mark => [ 1 .. 4 ] } ); #Type check failed in assignment to @!mark; expected Int but got Array # in method choose at ... line 10 # in block at ... line 16