You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if "is required" qualifies as an "initializer"
to someone but it doesn't in my mind. Also, it would be nice
if it was called an attribute instead of the more generic
term variable. See below.
[jdv@new-host-2 ~]$ perl6 -e 'class A {has Any:D $.a};A.new(:a(1))'
===SORRY!=== Error while compiling -e
Variable definition of type Any:D requires an initializer
at -e:1
------> class A {has Any:D $.a⏏};A.new(:a(1))
expecting any of:
constraint
[jdv@new-host-2 ~]$ perl6 -e 'class A {has Any:D $.a=2};A.new(:a(1))'
[jdv@new-host-2 ~]$ perl6 -e 'class A {has Any:D $.a is
required};A.new(:a(1))'
[jdv@new-host-2 ~]$ perl6 -v
This is Rakudo version 2016.12-377-g7ddc5f7 built on MoarVM version
2016.12-113-gd1da1ba
implementing Perl 6.c.
[jdv@new-host-2 ~]$
Migrated from rt.perl.org#130589 (status was 'new')
Searchable as RT130589$
The text was updated successfully, but these errors were encountered: