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


<masak> perl6: class A { my subset B of Int where { $^n < 10 }; has B
$.c }; A.new( c => 20 ); say "alive"
<p6eval> elf 26845: OUTPUT«Unknown rule:
type_declarator:expect_term␤It needs to be
         added to ast_handlers.␤ at ./elf_h line 2850␤»
<p6eval> ..pugs, rakudo 1f1458: OUTPUT«alive␤»
* masak submits rakudobug
<masak> rakudo: class A { my subset B of Int where { $^n < 10 }; has B
$.c }; my $a = A.new( c => 20 ); say $a.c
<p6eval> rakudo 1f1458: OUTPUT«20␤»
<masak> hah!

I would expect the instantiation to fail, because 20 is not a legit
value of the subtype B.

Reply via email to