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

"&infix:«$var»" interpolation throws spurious compile-time warning #5055

Open
p6rt opened this issue Jan 16, 2016 · 1 comment
Open

"&infix:«$var»" interpolation throws spurious compile-time warning #5055

p6rt opened this issue Jan 16, 2016 · 1 comment

Comments

@p6rt
Copy link

p6rt commented Jan 16, 2016

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

Searchable as RT127284$

@p6rt
Copy link
Author

p6rt commented Jan 16, 2016

From @skids

$ perl6 -e 'sub f ($op) { "&infix​:<$op>"; }; f("+").perl.say' # This is OK
"\&infix​:<+>"

$ perl6 -e 'sub f ($op) { "&infix​:«$op»"; }; f("+").perl.say' # This warning should not happen since there is no interpolation of &thing without () after it.
Use of uninitialized value of type Mu in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in code at -e line 1
"\&infix​:«+»"

$ perl6 -e 'sub f ($op) { "&infix​:«$op»(1,2)"; }; f("+").perl.say' # Whether the warning should happen here is beyond me, the error is correct because an EVAL would be required to dynamically use :infix«...»
Use of uninitialized value of type Mu in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in code at -e line 1
===SORRY!=== Error while compiling -e
Undeclared routine​:
  infix​:<> used at line 1. Did you mean 'infix​:<->', 'infix​:<∖>', 'infix​:<o>', 'infix​:<⊎>'?

autarch++'s original problem leading up to this diagnosis​:
http://irclog.perlgeek.de/perl6/2016-01-16#i_11896249

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