Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #112908] cannot use result of enum invocation with infix:<but>, even though it is identical to the enum value

0 views
Skip to first unread message

Moritz Lenz

unread,
May 13, 2012, 5:21:42 AM5/13/12
to bugs-bi...@rt.perl.org
# New Ticket Created by Moritz Lenz
# Please include the string: [perl #112908]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112908 >


< moritz> r: enum day <a b c d e>;say day(3) === d; "foo" but d; say
"alive"; "foo" but day(3)
<+p6eval> rakudo 2ac569: OUTPUT«True␤alive␤Type check failed
in assignment to '$!day'; expected 'day' but got 'Int'␤
in block <anon> at src/gen/CORE.setting:650␤
in method BUILD_LEAST_DERIVED at src/gen/CORE.setting:637␤
in sub infix:<but> at src/gen/CORE.setting:10579␤
< moritz> day(3) === d is True, but '"foo" but d' and '"foo" but
day(3)' dies?
< moritz> r: enum A <b c>; nqp::say nqp::iscont(b); nqp::say
nqp::iscont(A(0))
<+p6eval> rakudo 2ac569: OUTPUT«0␤0␤»

So that's not the problem either.
0 new messages