I would add on top of Curt's explanation. Try assigning Nil to $x and then ask for its type. You'll get your Real back!
> 16 вер. 2018 р. о 22:11 Curt Tilmes <c...@tilmes.org> написав(ла): > > It isn't changing anything. > > You've still got a box ('container') that can only hold something 'Real'. > > You just happen to have a value in that box that is a 'Rat'. > > It is perfectly fine to put a Rat value in a Real box, because a Rat is also > a Real (does the 'Real' role). > > You can still stick some other Real in the box, and you still can't stick > anything that isn't a Real in the box. > > > > On Sun, Sep 16, 2018 at 10:07 PM ToddAndMargo <toddandma...@zoho.com > <mailto:toddandma...@zoho.com>> wrote: > On 09/16/2018 06:50 PM, Curt Tilmes wrote: > > Note that an object that is a Rat also does Real (see > > https://docs.perl6.org/type/Rat#Type_Graph > > <https://docs.perl6.org/type/Rat#Type_Graph>) > > > > say Rat ~~ Real > > > > True > > > > Your're making a box that takes a Real, then putting a Rat (that also does > > Real) into that box. > > > > It then says "yes, you've got a Rat in there". > > > > > > Why is it changing thing on the fly when I tell it not to? > I claim foul !!!!!! AAAAAA HHHHHHH !!! Best regards, Vadim Belman