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


There is some combination of subset/multi that causes Cannot invoke  
this object (REPR: Null; VMNull) error to be displayed:

<ZoffixW> m: subset InfTan of Numeric where $_ == 1; multi tan  
(InfTan) {}; say tan(2)
<camelia> rakudo-moar f7770e: OUTPUT«Cannot invoke this object (REPR:  
Null; VMNull)␤  in any accepts_type at gen/moar/m-Metamodel.nqp line  
3472␤  in sub tan at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
<ZoffixW> m: subset InfTan of Num where $_ % (π/2) ≅ 0; multi tan  
(InfTan) { ∞ }; say tan(π)
<camelia> rakudo-moar f7770e: OUTPUT«Cannot invoke this object (REPR:  
Null; VMNull)␤  in any accepts_type at gen/moar/m-Metamodel.nqp line  
3472␤  in sub tan at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»

Yet, slightly altered variations such as changing base type of subset,  
the where condition, or multi-to-only do not produce that error:

<ZoffixW> m: subset InfTan of Num  where $_ == 1; multi tan (InfTan)  
{}; say tan(2)
<camelia> rakudo-moar f7770e: OUTPUT«-2.18503986326152␤»
<ZoffixW> m: subset InfTan of Num where $_ == 1; multi tan (InfTan)  
{}; say tan(2)
<camelia> rakudo-moar f7770e: OUTPUT«-2.18503986326152␤»
<ZoffixW> m: multi tan ($ where * % (π/2) ≅ 0 ) { ∞ }; say tan(π)
<camelia> rakudo-moar f7770e: OUTPUT«-1.22464679914735e-16␤»
<ZoffixW> m: multi tan ($ where $_ % (π/2) ≅ 0 ) { ∞ }; say tan(π)
<camelia> rakudo-moar f7770e: OUTPUT«-1.22464679914735e-16␤»
<ZoffixW> m: subset InfTan of Num; multi tan (InfTan) { ∞ }; say tan(π)
<camelia> rakudo-moar f7770e: OUTPUT«Inf␤»
<ZoffixW> m: subset InfTan of Num where * % (π/2) ≅ 0; say tan(π) ~~ InfTan
<camelia> rakudo-moar f7770e: OUTPUT«False␤»

Reply via email to