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

.list/.hash can give any Positional/Associative, but core code has stricter assumptions #2199

Closed
zoffixznet opened this issue Aug 10, 2018 · 1 comment
Labels

Comments

@zoffixznet
Copy link
Contributor

This is probably more of a docs Issue:

Based on previous discussions in R#1344, it was stated that .list can return any Positional. However, a bunch of core code assumes it'll get a something a lot more like a List from that method.

A Positional doesn't require implementation of .kv, for example, so if I return this class from .list, I get an infiniloop hang because it keeps trying to coerce itself to something more like a List:

$ perl6 -e 'class :: does Positional { method list { self } }.new.kv.perl.say'
^C

Should the description of .list be more like return any core Positional type?

@lizmat
Copy link
Contributor

lizmat commented Aug 10, 2018

Probably :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants