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

.cando fails to locate candidates with native parameters #6348

Open
p6rt opened this issue Jun 17, 2017 · 1 comment
Open

.cando fails to locate candidates with native parameters #6348

p6rt opened this issue Jun 17, 2017 · 1 comment

Comments

@p6rt
Copy link

p6rt commented Jun 17, 2017

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

Searchable as RT131590$

@p6rt
Copy link
Author

p6rt commented Jun 17, 2017

From @zoffixznet

Using .cando, the method with native str param doesn't get found, even when using native str in the Capture​:

  <Zoffix__> m​: class Foo { method x(str $y) { say "here" } }; dd Foo.^lookup('x').cando​: \(Foo, my str $ = 'x')
  <camelia> rakudo-moar 369f25​: OUTPUT​: «()␤»
  <Zoffix__> m​: class Foo { method x(str $y) { say "here" } }; dd Foo.^lookup('x').cando​: \(Foo, 'x')
  <camelia> rakudo-moar 369f25​: OUTPUT​: «()␤»

Yet it can be called with and without using name str arg​:

  <Zoffix__> m​: class Foo { method x($y) { say "here" } }; dd Foo.x​: 'x'
  <camelia> rakudo-moar 369f25​: OUTPUT​: «here␤Bool​::True␤»
  <Zoffix__> m​: class Foo { method x(str $y) { say "here" } }; dd Foo.x​: 'x'
  <camelia> rakudo-moar 369f25​: OUTPUT​: «here␤Bool​::True␤»
  <Zoffix__> m​: class Foo { method x(str $y) { say "here" } }; dd Foo.x​: my str $ = 'x'
  <camelia> rakudo-moar 369f25​: OUTPUT​: «here␤Bool​::True␤»

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