has $.foo = $.bar needlessly rejected #93

Closed
sorear opened this Issue Dec 18, 2011 · 1 comment

1 participant

@sorear
Owner
02:37 < moritz> niecza: class A { has $.a; has $.b = $.a }
02:37 <+p6eval> niecza v12-66-g5abbd8a: OUTPUT«===SORRY!===␤␤Variable $.a used 
                where no 'self' is available at /tmp/KLDwQcyxJx line 1:␤------> 
                class A { has $.a; has $.b = ⏏$.a }␤␤Unhandled exception: Check 
                failed␤␤  at /home/p6eval/niecza/boot/lib/CORE.setting line…
02:38 < moritz> sorear: that error is questionable; when $.b is initialized, an 
                invocant needs to be somewhere, so you can just make it 
                available
@sorear
Owner

More recent discussion has indicated that has $.b = $.a shouldn't be allowed, and you need to use has $.b = $!a. However, this ticket is still valid, since Niecza doesn't accept the latter form either.

@sorear sorear closed this in 5192417 May 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment