<div dir="ltr"><div>Hi,</div><div><br></div><div>In the OTP-23 blog entry, there is an example of a illegal map match:</div><div><br></div>  illegal_example(Key, #{Key := Value}) -> Value.<div><br></div><div>Can someone explain why the compiler couldn't automatically rewrite that to:<br clear="all"><div><br></div><div>   legal_example(Key, Map) when is_map_key(Key, Map) -> maps:get(Key, Map).<br></div></div><div><br></div><div>Such a rewrite should be possible whenever there are further restrictions (matches or guards) on the content of Value, right?</div><div><br></div><div>Andreas</div></div>