R13B02-1: a patch for omitting a warning on {foo, bar}:fun(args) calls

Yurii Rashkovskii <>
Mon Oct 19 13:33:06 CEST 2009


Currently erlc will spit a warning on this kind of constructs:

{db, "localhost"}:connect()

as opposed to

DB = {db, "localhost"},

The warning will look like:

Warning: invalid module and/or function name; this call will always fail

which is misleading, because this call will not fail (provided modules  
are in place and such)

Here is a proposed solution to the problem:


I am not sure it is perfect (hey, I am not an erlang compiler hacker,  
as of yet), but it proved to work quite well for me.

Any chance it can make it to the mainstream in some way?


More information about the erlang-patches mailing list