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

Specialization causes mixing of arrays and lists to die #3745

Closed
p6rt opened this issue Mar 19, 2015 · 4 comments
Closed

Specialization causes mixing of arrays and lists to die #3745

p6rt opened this issue Mar 19, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Mar 19, 2015

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

Searchable as RT124121$

@p6rt
Copy link
Author

p6rt commented Mar 19, 2015

From @labster

Using the 'but' mixin, I seem to get a lot of NQP errors bubbling to the surface.

labster​: m​: 12 but ("hi", "ho");
camelia​: rakudo-moar ac5f2e​: OUTPUT«Cannot find method 'specialize'␤ in any compose at src/gen/m-Metamodel.nqp​:2741␤ in any generate_mixin at src/gen/m-Metamodel.nqp​:1267␤ in any at src/gen/m-Metamodel.nqp​:1188␤ in any mixin at src/gen/m-Metamodel.nqp​:1223␤ in sub infix​:<but>…»
labster​: r​: 12 but ("hi", "ho").list;
[camelia​: rakudo-moar ac5f2e​: OUTPUT«Cannot find method 'specialize'␤ in any compose at src/gen/m-Metamodel.nqp​:2741␤ in any generate_mixin at src/gen/m-Metamodel.nqp​:1267␤ in any at src/gen/m-Metamodel.nqp​:1188␤ in any mixin at src/gen/m-Metamodel.nqp​:1223␤ in sub infix​:<but>…»
labster​: r​: True but [ 1, 2 ]
camelia​: rakudo-moar ac5f2e​: OUTPUT«Cannot find method 'specialize'␤ in any compose at src/gen/m-Metamodel.nqp​:2741␤ in any generate_mixin at src/gen/m-Metamodel.nqp​:1267␤ in any at src/gen/m-Metamodel.nqp​:1188␤ in any mixin at src/gen/m-Metamodel.nqp​:1223␤ in sub infix​:<but>…»
labster​: r​: True but { "foo" => "bar" }
camelia​: rakudo-moar 66a5bb​: ( no output )

@p6rt
Copy link
Author

p6rt commented Jul 18, 2015

From @jnthn

On Thu Mar 19 16​:42​:40 2015, labster wrote​:

Using the 'but' mixin, I seem to get a lot of NQP errors bubbling to
the surface.

labster​: m​: 12 but ("hi", "ho");
camelia​: rakudo-moar ac5f2e​: OUTPUT«Cannot find method 'specialize'␤
in any compose at src/gen/m-Metamodel.nqp​:2741␤ in any generate_mixin
at src/gen/m-Metamodel.nqp​:1267␤ in any at src/gen/m-
Metamodel.nqp​:1188␤ in any mixin at src/gen/m-Metamodel.nqp​:1223␤ in
sub infix​:<but>…»
labster​: r​: 12 but ("hi", "ho").list;
[camelia​: rakudo-moar ac5f2e​: OUTPUT«Cannot find method 'specialize'␤
in any compose at src/gen/m-Metamodel.nqp​:2741␤ in any generate_mixin
at src/gen/m-Metamodel.nqp​:1267␤ in any at src/gen/m-
Metamodel.nqp​:1188␤ in any mixin at src/gen/m-Metamodel.nqp​:1223␤ in
sub infix​:<but>…»
labster​: r​: True but [ 1, 2 ]
camelia​: rakudo-moar ac5f2e​: OUTPUT«Cannot find method 'specialize'␤
in any compose at src/gen/m-Metamodel.nqp​:2741␤ in any generate_mixin
at src/gen/m-Metamodel.nqp​:1267␤ in any at src/gen/m-
Metamodel.nqp​:1188␤ in any mixin at src/gen/m-Metamodel.nqp​:1223␤ in
sub infix​:<but>…»
labster​: r​: True but { "foo" => "bar" }
camelia​: rakudo-moar 66a5bb​: ( no output )

Note that True but (1, 2) is a special form that will fail, but by virtue of the fact that​:

True but 1 # generates a role with method Int { 1 }
True but "x" # generates a role with method Str { "x" }
True but (1, "x") # generates two roles above
True but (1, 1) # generates first role twice and conflict

But "True but [1,2]" should generate an Array method and "True but (1, 2).list" should generate a List method, e.g. the form is syntactic. I've fixed those now, and added tests for all of them in S14-role/mixin.t.

@p6rt
Copy link
Author

p6rt commented Jul 18, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 18, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jul 18, 2015
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