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 bind private hash attribute with key type constraint #5058

Open
p6rt opened this issue Jan 16, 2016 · 2 comments
Open

cannot bind private hash attribute with key type constraint #5058

p6rt opened this issue Jan 16, 2016 · 2 comments
Labels
Bug

Comments

@p6rt
Copy link

@p6rt p6rt commented Jan 16, 2016

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

Searchable as RT127292$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Jan 16, 2016

From rightfold@gmail.com

Consider the following code​:

  class C {
  has %!h{Pair};

  method m {
  %!h := %!h.clone;
  }
  }

  C.new.m;

rather than succeeding, it fails with​:

Type check failed in binding; expected Associative[Any,Pair] but got Hash[Any,Pair]
in method m at /tmp/clone.p6 line 4
in block <unit> at /tmp/clone.p6 line 9

Removing "{Pair}" from the code makes the code work, however.

Rakudo version​:

This is Rakudo version 2015.12 built on MoarVM version 2015.12 implementing Perl 6.c.

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Aug 6, 2016

From @zoffixznet

Still present in Rakudo version 2016.07.1-88-g15ee3c3 built on MoarVM version 2016.07-11-g11e02fe

@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
1 participant
You can’t perform that action at this time.