summaryrefslogtreecommitdiff
path: root/lib/compiler/src/compile.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2021-02-11 12:57:40 +0100
committerBjörn Gustavsson <bjorn@erlang.org>2021-02-15 08:51:17 +0100
commita6b66d89119e3ae9e4b34f17b97138776b750f0d (patch)
tree16e875cb75b717851ddc40ddc0a7ac439466c9ba /lib/compiler/src/compile.erl
parent215647290523a79ab287964a0d8a7d9722e7dbab (diff)
downloaderlang-a6b66d89119e3ae9e4b34f17b97138776b750f0d.tar.gz
compile: Restrict types of outfile/3
The Ext argument in outfile(Base, Ext, Opts) must now be a list (the clause allowing an atom was not covered).
Diffstat (limited to 'lib/compiler/src/compile.erl')
-rw-r--r--lib/compiler/src/compile.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 8cb0b4381b..356d5eb014 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -1727,9 +1727,7 @@ erlfile(".", Base, Suffix) ->
erlfile(Dir, Base, Suffix) ->
filename:join(Dir, Base ++ Suffix).
-outfile(Base, Ext, Opts) when is_atom(Ext) ->
- outfile(Base, atom_to_list(Ext), Opts);
-outfile(Base, Ext, Opts) ->
+outfile(Base, Ext, Opts) when is_list(Ext) ->
Obase = case keyfind(outdir, 1, Opts) of
{outdir, Odir} -> filename:join(Odir, Base);
_Other -> Base % Not found or bad format