diff options
author | Raimo Niskanen <[email protected]> | 2016-07-15 16:18:06 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2016-07-18 16:04:49 +0200 |
commit | edd9607b3bea79be718b774b8c58e623b918eee2 (patch) | |
tree | 607d059eab8ef31b975e61dd8b0938fd6c3ecfac /lib/stdlib/src/gen_statem.erl | |
parent | ddfae156c2b21d5266bd6eb82bf9ca7c508226fd (diff) | |
download | otp-edd9607b3bea79be718b774b8c58e623b918eee2.tar.gz otp-edd9607b3bea79be718b774b8c58e623b918eee2.tar.bz2 otp-edd9607b3bea79be718b774b8c58e623b918eee2.zip |
Fix type and template errors from bugs.erlang.org: ERL-172 and ERL-187
Diffstat (limited to 'lib/stdlib/src/gen_statem.erl')
-rw-r--r-- | lib/stdlib/src/gen_statem.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl index 23bddafeed..c02e6a1a19 100644 --- a/lib/stdlib/src/gen_statem.erl +++ b/lib/stdlib/src/gen_statem.erl @@ -219,9 +219,10 @@ OldState :: state(), OldData :: data(), Extra :: term()) -> - {NewCallbackMode :: callback_mode(), + {CallbackMode :: callback_mode(), NewState :: state(), - NewData :: data()}. + NewData :: data()} | + (Reason :: term()). %% Format the callback module state in some sensible that is %% often condensed way. For StatusOption =:= 'normal' the perferred @@ -630,11 +631,11 @@ system_code_change( Result -> Result end of - {NewCallbackMode,NewState,NewData} -> - callback_mode(NewCallbackMode) orelse - error({callback_mode,NewCallbackMode}), + {CallbackMode,NewState,NewData} -> + callback_mode(CallbackMode) orelse + error({callback_mode,CallbackMode}), {ok, - S#{callback_mode := NewCallbackMode, + S#{callback_mode := CallbackMode, state := NewState, data := NewData}}; {ok,_} = Error -> |