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


<andreoss> m: subset Y of Int where 1..10; my Y @x; @x.push: 10; @x[0]++ ;
           @x.perl.say
<camelia> rakudo-moar 2c58ee: OUTPUT«Array[Y].new(11)␤»
<andreoss> m: subset Y of Int where 1..10; my Y @x; @x[0] = 10; @x[0]++ ;
           @x.perl.say
<camelia> rakudo-moar 2c58ee: OUTPUT«Type check failed in assignment to '@x';
          expected 'Y' but got 'Int'␤  in block <unit> at /tmp/1211Xh_ZOc:1␤␤»
<andreoss> why pushed value is not type checked?
<moritz> because bug
<moritz> I guess that push doesn't create the right Scalar container for the
         new elemnt

Reply via email to