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

Should calling accessed map values as functions be a compiler warning? #11160

Closed
LandonSchropp opened this issue Jul 31, 2021 · 2 comments
Closed

Comments

@LandonSchropp
Copy link

Environment

  • Erlang/OTP 24 [erts-12.0.3]
  • Elixir 1.12.2
  • macOS 11.4

Current behavior

This compiles and runs without warnings:

map = %{ hello: "hello" }
map.hello
map.hello()

Expected behavior

I'm a bit surprised that the map.hello() isn't a compiler error or warning. Should it be?

@LandonSchropp LandonSchropp changed the title Should calling map keys as functions be a compiler warning? Should calling accessed map values as functions be a compiler warning? Jul 31, 2021
@josevalim
Copy link
Member

Please see #9510. We are tackling this in steps and deprecations are coming in. :)

@LandonSchropp
Copy link
Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants