Things have changed and infix:<::=> is used instead of a variable trait "is
readonly". The tests for this ticket are gone with this commit:
https://github.com/perl6/roast/commit/253242f3dd7ece23c6390a80cdcdf78b561cc973
> my $a is readonly = 5; say $a;
===SORRY!=== Error while compiling
Can't use unknown trait 'is readonly' in a variable declaration.
at :1
------> my $a is readonly ⏏= 5; say $a;
expecting any of:
TypeObject
default
dynamic
> (my $a is readonly) = 5; say $a;
Can't use unknown trait 'is readonly' in a variable declaration.
at :1
------> (my $a is readonly⏏) = 5; say $a;
expecting any of:
TypeObject
default
dynamic
> my ($a is readonly) = 5; say $a; $a++; say $a;
5
6
I think the last one should also result in a compile time error. But I don't
know how to fix it.