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


<masak> rakudo: class A {}; class B {}; subset C of A & B; say C ~~ A;
say C ~~ B
<p6eval> rakudo 7347ec:  ( no output )
<masak> locally, that gives 1\n0\n
<moritz_> std: class A {}; class B {}; subset C of A & B; say C ~~ A; say C ~~ B
<p6eval> std 29199: ok 00:01 106m␤
<moritz_> masak: everything that declares a new class makes p6eval time out
* masak submits rakudobug
<masak> ah! the 'subset' syntax only expects exactly one type.
<masak> that explains the strange output from the first one-liner.
<masak> rakudo: subset C of (Str & Int); say C ~~ Str; say C ~~ Int
<p6eval> rakudo 7347ec: Confused at line 2, near "of (Str & " [...]
<moritz_> masak: subsets are basically a nominal type + constraints, I
don't think you can make a symmetric, conjunctive type of two other
types
<masak> moritz_: no, probably not.
<masak> moritz_: wait. it depends. for roles, it shouldn't be a problem.
<masak> actually, now I don't see the problem at all.
<masak> the nominal part happens to be an and-junction.

Reply via email to