aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-05-23 09:24:17 +0200
committerHans Bolinder <[email protected]>2014-05-23 09:24:17 +0200
commitddf75def890d6f6a19fe46b22604ac3d8a62040a (patch)
treead63fdd7937f8b743f0e06330fee9522fa538747 /lib/dialyzer/test/small_SUITE_data/src
parent8231acf6362e8902ca60ecabbafc18f42ec4534a (diff)
downloadotp-ddf75def890d6f6a19fe46b22604ac3d8a62040a.tar.gz
otp-ddf75def890d6f6a19fe46b22604ac3d8a62040a.tar.bz2
otp-ddf75def890d6f6a19fe46b22604ac3d8a62040a.zip
hipe: fix a bug concerning typed record fields
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/src')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl b/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl
new file mode 100644
index 0000000000..35687e22ec
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl
@@ -0,0 +1,17 @@
+-module(remote_field2).
+
+-export([handle_cast/2]).
+
+-record(state, {tcp_socket :: inet:socket()}).
+
+-spec handle_cast(_,_) ->
+ {noreply,_} |
+ {stop,{shutdown,connection_closed},
+ #state{tcp_socket :: port()}}.
+handle_cast({send, Message}, #state{tcp_socket = TCPSocket} = State) ->
+ case gen_tcp:send(TCPSocket, Message) of
+ ok ->
+ {noreply, State};
+ {error, closed} ->
+ {stop, {shutdown, connection_closed}, State}
+ end.