<div dir="ltr">Hello!<div><br></div><div>It seems that there are some leftovers from the parameterized modules support in the compiler for Erlang 18 RC2 (and also earlier Erlang versions). In the example below, even though the compiler emits warnings when a tuple is used as a module name, the code executes without error.</div><div><br></div><div>Requesting HiPE compilation restores the 'correct' behaviour (an error is raised).</div><div><br></div><div>Regards,</div><div><br></div><div>Stavros</div><div><br></div><div>---</div><div><br></div><div><div>$ cat tuple_as_module.erl </div><div>-module(tuple_as_module).</div><div><br></div><div>-export([test/0, action/2]).</div><div><br></div><div>test() -></div><div>  P = {?MODULE, [1,2,3]},</div><div>  {P:action(head),</div><div>   P:action(tail)}.</div><div><br></div><div>action(head, {?MODULE, List}) -></div><div>  hd(List);</div><div>action(tail, {?MODULE, List}) -></div><div>  tl(List).</div><div>$ erl</div><div>Erlang/OTP 18 [RELEASE CANDIDATE 2] [erts-7.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]</div><div><br></div><div>Eshell V7.0  (abort with ^G)</div><div>1> c(tuple_as_module).</div><div>tuple_as_module.erl:7: Warning: invalid module and/or function name; this call will always fail</div><div>tuple_as_module.erl:8: Warning: invalid module and/or function name; this call will always fail</div><div>{ok,tuple_as_module}</div><div>2> tuple_as_module:test().</div><div>{1,[2,3]}</div><div>3> c(tuple_as_module, [native]).</div><div>tuple_as_module.erl:7: Warning: invalid module and/or function name; this call will always fail</div><div>tuple_as_module.erl:8: Warning: invalid module and/or function name; this call will always fail</div><div>{ok,tuple_as_module}</div><div>4> tuple_as_module:test().      </div><div>** exception error: bad argument</div></div></div>