aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_compile.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-03-20 16:01:54 +0100
committerHans Bolinder <[email protected]>2014-03-20 16:01:54 +0100
commiteb44d0b913a97bf460ba890b04900096f79dcd53 (patch)
tree16eac06dc26ff313b4a7c7bf6e37bec1eacccaef /lib/stdlib/src/erl_compile.erl
parent73af231f1a22083031df49ba19fdfd4f6b434a10 (diff)
parente2733e0dfe107e2f48c083841ffd128bcbf0abef (diff)
downloadotp-eb44d0b913a97bf460ba890b04900096f79dcd53.tar.gz
otp-eb44d0b913a97bf460ba890b04900096f79dcd53.tar.bz2
otp-eb44d0b913a97bf460ba890b04900096f79dcd53.zip
Merge branch 'hb/spec_related_fixes'
* hb/spec_related_fixes: test_server: Fix a Dialyzer warning Correct the contract of io:getopts() Fix some Dialyzer warnings
Diffstat (limited to 'lib/stdlib/src/erl_compile.erl')
-rw-r--r--lib/stdlib/src/erl_compile.erl18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/stdlib/src/erl_compile.erl b/lib/stdlib/src/erl_compile.erl
index ed8fea5d78..caed4d41d6 100644
--- a/lib/stdlib/src/erl_compile.erl
+++ b/lib/stdlib/src/erl_compile.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -66,7 +66,7 @@ my_halt(Reason) ->
compile(List) ->
process_flag(trap_exit, true),
- Pid = spawn_link(fun() -> compiler_runner(List) end),
+ Pid = spawn_link(compiler_runner(List)),
receive
{'EXIT', Pid, {compiler_result, Result}} ->
Result;
@@ -79,14 +79,16 @@ compile(List) ->
error
end.
--spec compiler_runner([cmd_line_arg()]) -> no_return().
+-spec compiler_runner([cmd_line_arg()]) -> fun(() -> no_return()).
compiler_runner(List) ->
- %% We don't want the current directory in the code path.
- %% Remove it.
- Path = [D || D <- code:get_path(), D =/= "."],
- true = code:set_path(Path),
- exit({compiler_result, compile1(List)}).
+ fun() ->
+ %% We don't want the current directory in the code path.
+ %% Remove it.
+ Path = [D || D <- code:get_path(), D =/= "."],
+ true = code:set_path(Path),
+ exit({compiler_result, compile1(List)})
+ end.
%% Parses the first part of the option list.