# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #122109]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=122109 >


<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.

Reply via email to