This is an automatically generated mail to inform you that tests are now available in t/spec/S06-traits/is-readonly.t
commit 60eb8fe4fe2597318596142bd3268ad9d4b49033 Author: kyle <k...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Tue Oct 27 02:34:58 2009 +0000 [t/spec] Test for RT #65900 git-svn-id: http://svn.pugscode.org/p...@28913 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S06-traits/is-readonly.t b/t/spec/S06-traits/is-readonly.t index 0774abd..389f8a7 100644 --- a/t/spec/S06-traits/is-readonly.t +++ b/t/spec/S06-traits/is-readonly.t @@ -4,7 +4,7 @@ use Test; # L<S06/"Parameter traits"/"=item is readonly"> # should be moved with other subroutine tests? -plan 9; +plan *; { my $a is readonly := 42; @@ -40,4 +40,16 @@ plan 9; ok (try { VAR($a).defined }), ".VAR on a plain normal initialized variable returns true"; } +# RT #65900 +{ + my ($rt65900 is readonly) = 5; + is $rt65900, 5, 'my ($x is readonly) can take assignment'; + dies_ok { $rt65900 = 'ro' }, 'dies on assignment to readonly variable'; + + dies_ok { (my $rt65900 is readonly) = 5 }, + 'dies on assignment to (my $x is readonly)'; +} + +done_testing; + # vim: ft=perl6