Skip to content

Conversation

@henrik
Copy link
Contributor

As they would result in warnings otherwise.

As they would result in warnings otherwise.
@josevalim
Copy link
Member

Those do not warn BUT it is nice to fix them anyway, thanks!
💚 💙 💜 💛 ❤️

@josevalimjosevalim merged commit 004484b into elixir-lang:masterJun 20, 2020
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@henrik
Copy link
ContributorAuthor

❤️ I tried copying one into my code and calling without parentheses in a test and got a warning, but maybe I missed something :)

@henrik
Copy link
ContributorAuthor

Checked again for my own sanity :D

defmodule Lab do defmacro mymacro, do: IO.puts("Hello from Elixir #{System.version()}!") end defmodule Run do import Lab def run do mymacro end end Run.run 

gets me

warning: variable "mymacro" does not exist and is being expanded to "mymacro()", please use parentheses to remove the ambiguity or change the variable name nofile:9: Run.run/0 Hello from Elixir 1.10.3! 

@henrikhenrik deleted the patch-4 branch June 20, 2020 09:47
@josevalim
Copy link
Member

Right, but those are qualified calls. Lab.mymacro doesn't warn, mymacro does. :)

@henrik
Copy link
ContributorAuthor

Ah! Glad I asked :) Thanks, José!

vladdu pushed a commit to vladdu/elixir-lang.github.com that referenced this pull request Jan 26, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@henrik@josevalim