diff options
author | Henrik Nord <[email protected]> | 2011-09-08 16:31:01 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-09-08 16:31:07 +0200 |
commit | b9cc262cb672c70a3031d9feb66ea428dafe796d (patch) | |
tree | 03627de309e46b11613b0e545d75646f975d12d4 /lib/dialyzer/test/small_SUITE_data/src/rebar_no_return.erl | |
parent | 4273aeda2b9e64efac72a4c381fe56cdb2927dc8 (diff) | |
parent | 4d9bf5ceed7e98e607b62cd39cc3c948e8fb79a7 (diff) | |
download | otp-b9cc262cb672c70a3031d9feb66ea428dafe796d.tar.gz otp-b9cc262cb672c70a3031d9feb66ea428dafe796d.tar.bz2 otp-b9cc262cb672c70a3031d9feb66ea428dafe796d.zip |
Merge branch 'sa/dialyzer-dev' into dev
* sa/dialyzer-dev:
Add origin information to #fun_var closures
Suppress some warnings about generation of non-returning funs
Enhance Dialyzer's inference on comparisons
Fix infinite loop in dataflow
Minor fix in dead code
Update r9c/{inets,mnesia} results in dialyzer's test suite
OTP-9529
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/src/rebar_no_return.erl')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/rebar_no_return.erl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/rebar_no_return.erl b/lib/dialyzer/test/small_SUITE_data/src/rebar_no_return.erl new file mode 100644 index 0000000000..d3b504ae04 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/rebar_no_return.erl @@ -0,0 +1,19 @@ +-module(rebar_no_return). + +-export([t/0]). + +-spec t() -> no_return(). +t() -> + F = log_and_halt("baz"), + F("foo", 123). + +-spec log_and_halt(string()) -> fun((string(),integer()) -> no_return()). +log_and_halt(Msg) -> + fun(_, _) -> + abort(Msg) + end. + +-spec abort(string()) -> no_return(). +abort(Msg) -> + io:format("~s~n", [Msg]), + halt(1). |