Skip Menu |
Report information
Id: 122109
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Mon, 16 Jun 2014 12:07:39 +0200
From: Carl Mäsak <cmasak [...] gmail.com>
Subject: [NYI] 'where' clauses on attributes do nothing in Rakudo
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 704b
<masak> r: class Conf { has @.boxes where { all(@$_) >= 0 } }; my $c = Conf.new(:boxes[ 2, 2, -1 ]); say $c.perl <camelia> rakudo-{parrot,jvm,moar} f1b05d: OUTPUT«Conf.new(boxes => Array.new(2, 2, -1))␤» <masak> should this be allowed? <moritz> nope <Ven> masak: It doesn't even look like the `where` is evaluated <masak> r: class C { has $.x where * > 0 }; say C.new(:x(-42)).x <camelia> rakudo-{parrot,jvm,moar} f1b05d: OUTPUT«-42␤» * masak submits rakudobug <masak> niecza: class C { has $.x where * > 0 }; say C.new(:x(-42)).x <camelia> niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Postconstraints, and shapes on variable declarators NYI [...]» <masak> at least Niecza knows it can't.
Download (untitled) / with headers
text/plain 130b
I added a fudged (skip) test to S12-class/attributes.t with the following commit: https://github.com/perl6/roast/commit/cc6dfe8bd8


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org