Navigation Menu

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 mix in a role that's stored in a variable (JVM and Moar) #3368

Closed
p6rt opened this issue Apr 10, 2014 · 3 comments
Closed

Cannot mix in a role that's stored in a variable (JVM and Moar) #3368

p6rt opened this issue Apr 10, 2014 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Apr 10, 2014

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

Searchable as RT121626$

@p6rt
Copy link
Author

p6rt commented Apr 10, 2014

From @moritz

<moritz> r​: my $a = []; my $role = role { has $.cool = "yeah" }; $a does
  $role; say $a.cool
<camelia> rakudo-parrot 9ff0bc​: OUTPUT«yeah␤»
<camelia> ..rakudo-jvm 9ff0bc​: OUTPUT«Nominal type check failed for
  parameter 'null'␤ in method at /tmp/tmpfile​:1␤ in block at
  gen/jvm/CORE.setting​:993␤ in method BUILD_LEAST_DERIVED at
  gen/jvm/CORE.setting​:951␤ in sub infix​:<does> at
  gen/jvm/CORE.setting​:16514␤ in sub infix​:<d…»
<camelia> ..rakudo-moar 9ff0bc​: OUTPUT«Type check failed in binding
  <anon>; expected '<anon>' but got 'Array+{<anon>}'␤ in method
  at /tmp/tmpfile​:1␤ in block at src/gen/m-CORE.setting​:993␤
  in method BUILD_LEAST_DERIVED at src/gen/m-CORE.setting​:951␤
  in sub infix​:<does> at src/gen/…»

But this one works​:

<moritz> r​: my $a = []; $a does role { has $.cool = "yeah" }; say $a.cool
<camelia> rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc​:
OUTPUT«yeah␤»

This cases test failures in t/spec/S14-roles/anonymous.t

@p6rt
Copy link
Author

p6rt commented Feb 8, 2015

From @moritz

Tests pass again => resolving.

@p6rt p6rt closed this as completed Feb 8, 2015
@p6rt
Copy link
Author

p6rt commented Feb 8, 2015

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

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