aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2016-07-19 14:35:18 +0200
committerRaimo Niskanen <[email protected]>2016-07-19 14:35:18 +0200
commit7c10598da79e28c9b802029d94269cbebba2f21e (patch)
tree3617ee5d1e37cd84acd89efcb2fc4a75a33f9f0b /lib/stdlib/src
parent440445cfd0cbeee8f2bb86b99b6d16caf7a5c9c7 (diff)
parentedd9607b3bea79be718b774b8c58e623b918eee2 (diff)
downloadotp-7c10598da79e28c9b802029d94269cbebba2f21e.tar.gz
otp-7c10598da79e28c9b802029d94269cbebba2f21e.tar.bz2
otp-7c10598da79e28c9b802029d94269cbebba2f21e.zip
Merge branch 'raimo/stdlib/gen_statem-types-and-templates/ERL-172_ERL-187/OTP-13746' into maint
* raimo/stdlib/gen_statem-types-and-templates/ERL-172_ERL-187/OTP-13746: Fix type and template errors from bugs.erlang.org: ERL-172 and ERL-187
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/gen_statem.erl13
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 ->