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,.List, (Real,) inconsistencies #5647

Open
p6rt opened this issue Sep 7, 2016 · 2 comments
Open

.list,.List, (Real,) inconsistencies #5647

p6rt opened this issue Sep 7, 2016 · 2 comments
Labels
Bug

Comments

@p6rt
Copy link

@p6rt p6rt commented Sep 7, 2016

Migrated from rt.perl.org#129220 (status was 'new')

Searchable as RT129220$

@p6rt
Copy link
Author

@p6rt p6rt commented Sep 7, 2016

From @LLFourn

say (Real,) ~~ Real.list; # False
say (Real,) ~~ Real.List; # False
say Real.list ~~ (Real,); # True
say Real.list ~~ Real.List; # True
say Real.List ~~ (Real,); # True
say Real.List ~~ Real.list; # True

say (Cool,) ~~ Cool.list; # True
say (Cool,) ~~ Cool.List; # True
say Cool.list ~~ (Cool,); # True
say Cool.list ~~ Cool.List; # True
say Cool.List ~~ (Cool,); # True
say Cool.List ~~ Cool.list; # True

(Real,) seems to be a special snowflake and that's not Cool.

@p6rt
Copy link
Author

@p6rt p6rt commented Sep 7, 2016

From @LLFourn

I Realised what's happening. Real is a role so calling .list on it puns it.

so the phenomenon can be boiled down to​:

Real ~~ Real.^pun # False

I'm not sure if it should be that way. I will accept notabug though :)

On Thu, Sep 8, 2016 at 12​:33 AM Lloyd Fournier <perl6-bugs-followup@​perl.org>
wrote​:

# New Ticket Created by Lloyd Fournier
# Please include the string​: [perl #​129220]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=129220 >

say (Real,) ~~ Real.list; # False
say (Real,) ~~ Real.List; # False
say Real.list ~~ (Real,); # True
say Real.list ~~ Real.List; # True
say Real.List ~~ (Real,); # True
say Real.List ~~ Real.list; # True

say (Cool,) ~~ Cool.list; # True
say (Cool,) ~~ Cool.List; # True
say Cool.list ~~ (Cool,); # True
say Cool.list ~~ Cool.List; # True
say Cool.List ~~ (Cool,); # True
say Cool.List ~~ Cool.list; # True

(Real,) seems to be a special snowflake and that's not Cool.

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.