Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
p6rt opened this issue May 13, 2012 · 3 comments

Comments

@p6rt
Copy link

p6rt commented May 13, 2012

Migrated from rt.perl.org#112908 (status was 'resolved')

Searchable as RT112908$

@p6rt
Copy link
Author

p6rt commented May 13, 2012

From @moritz

< 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.

@p6rt
Copy link
Author

p6rt commented May 13, 2012

From @moritz

fixed by jnthn++ in 9c85a3b and tested in S12-enum/pseudo-functional.t

@p6rt
Copy link
Author

p6rt commented May 13, 2012

@moritz - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed May 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant