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

is export() on one multi candidate exports all candidates #5916

Open
p6rt opened this issue Dec 27, 2016 · 1 comment
Open

is export() on one multi candidate exports all candidates #5916

p6rt opened this issue Dec 27, 2016 · 1 comment

Comments

@p6rt
Copy link

p6rt commented Dec 27, 2016

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

Searchable as RT130413$

@p6rt
Copy link
Author

p6rt commented Dec 27, 2016

From @zoffixznet

  $ cat Foo.pm6
  multi foo ($ ) is export { say "here" }
  multi foo ($, $) { say "there" }

  $ perl6 -I. -MFoo -e '.say for &foo.candidates'
  sub foo ($) { #`(Sub|64572824) ... }
  sub foo ($, $) { #`(Sub|64572976) ... }

My expectation is that only the candidate I marked for export would be exported. Especially since I know it's
possible to have different candidates visible in different scopes​:

  $ cat Foo.pm6
  multi foo ($ ) is export { say "here" }
  multi foo ($, $) { say "there" }
  .say for &foo.candidates
 
  $ perl6 -I. -MFoo -e 'multi foo ($, $, $) {}; say "----"; .say for &foo.candidates'
  sub foo ($) { #`(Sub|77538744) ... }
  sub foo ($, $) { #`(Sub|80610240) ... }
  ----
  sub foo ($) { #`(Sub|77538744) ... }
  sub foo ($, $) { #`(Sub|80610240) ... }
  sub foo ($, $, $) { #`(Sub|80617992) ... }

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