develooper Front page | perl.perl6.compiler | Postings from October 2011

[perl #65900] 'my ($a is readonly) = 5' should be allowed, but assigning to it afterward should be disallowed; '(my $a is readonly) = 5' should also be disallowed... in Rakudo

From:
Will Coleda via RT
Date:
October 8, 2011 12:40
Subject:
[perl #65900] 'my ($a is readonly) = 5' should be allowed, but assigning to it afterward should be disallowed; '(my $a is readonly) = 5' should also be disallowed... in Rakudo
Message ID:
rt-3.6.HEAD-31297-1318102826-1965.65900-15-0@perl.org
On Wed Jun 30 07:14:21 2010, bbkr wrote:
> $ perl6 -e 'my ($a is readonly) = 5; say $a; $a = 42; say $a'
> Cannot assign to readonly value
>   in '&infix:<=>' at line 1
>   in main program body at line 1
> 
> So it dies properly now.
> 
> But test file is not working due to := not implemented in earlier 
tests.

Good news: fudged the test and added it to t/spectest.data so it's run.

Bad news: I had to fudge these tests too.

-- 
Will "Coke" Coleda



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About