aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-05-26 08:53:17 +0200
committerHans Bolinder <[email protected]>2014-05-26 08:53:17 +0200
commit21af711057b5369e54d8eabf2f63eda734f5f259 (patch)
tree2ac5fbb0f35553bb94a8a83574a5c7c1c40629cf /lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl
parent6202139d7680be7df2fc5a6d6138409c1ae780d6 (diff)
parentddf75def890d6f6a19fe46b22604ac3d8a62040a (diff)
downloadotp-21af711057b5369e54d8eabf2f63eda734f5f259.tar.gz
otp-21af711057b5369e54d8eabf2f63eda734f5f259.tar.bz2
otp-21af711057b5369e54d8eabf2f63eda734f5f259.zip
Merge branch 'hb/hipe/field_with_remote/OTP-11918' into maint
* hb/hipe/field_with_remote/OTP-11918: hipe: fix a bug concerning typed record fields
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl')
-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.