Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve illegal pattern error for accidental map associations
Given a module such as this: -module(test). -export([pattern/1]). pattern(#{foo => bar}) -> ok. We presently report an error as: test.erl:4:15: illegal pattern % 4| pattern(#{foo => bar}) -> ok. % | ^ Since we have information in `erl_lint` on the bad pattern being a map field update, we can be a bit more helpful by extending the error with a hint instructing the user that `:=` is most likely wanted instead: test.erl:4:15: illegal pattern, did you mean to use `:=`? % 4| pattern(#{foo => bar}) -> ok. % | ^
- Loading branch information