Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[erl-frontend] Be less restrictive on map pattern keys
Summary: [This document](https://www.erlang.org/doc/apps/erts/absform.html#patterns) says > If P is a map pattern #{A_1, ..., A_k}, where each A_i is an association P_i_1 := P_i_2, which implied to us that both keys and values have to be patterns themselves. But [this other document](https://www.erlang.org/doc/reference_manual/expressions.html#maps-in-patterns) says > The key K must be a guard expression, with all variables already bound. V can be any pattern with either bound or unbound variables. and seems like the compiler also implements the latter. So adjusting our validation. Reviewed By: mmarescotti Differential Revision: D42191306 fbshipit-source-id: 6d5d96c51380719916a10f11c2a511b176afa2a4
- Loading branch information