diff options
author | Magnus Henoch <[email protected]> | 2019-07-12 14:38:05 +0100 |
---|---|---|
committer | Magnus Henoch <[email protected]> | 2019-07-12 14:38:05 +0100 |
commit | a69d7ba56ad1f0983c6aea7538742d2a1c4e1d7a (patch) | |
tree | 0acf98f7d9e804c64f1209a205138d6aebededde /lib/stdlib/src | |
parent | 7e77fb475fb8054b19e8e5ed3ed81d2c5950a0ff (diff) | |
download | otp-a69d7ba56ad1f0983c6aea7538742d2a1c4e1d7a.tar.gz otp-a69d7ba56ad1f0983c6aea7538742d2a1c4e1d7a.tar.bz2 otp-a69d7ba56ad1f0983c6aea7538742d2a1c4e1d7a.zip |
fun2ms: accept ++ in function head when called from shell
Code such as ets:fun2ms(fun({"foo" ++ X}) -> X end) works fine in
compiled code. Let's make it work when fun2ms is invoked from the
shell as well.
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/ms_transform.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/stdlib/src/ms_transform.erl b/lib/stdlib/src/ms_transform.erl index 97ec785c62..74efe5c513 100644 --- a/lib/stdlib/src/ms_transform.erl +++ b/lib/stdlib/src/ms_transform.erl @@ -1100,6 +1100,8 @@ normalise({bin,_,Fs}) -> B; normalise({cons,_,Head,Tail}) -> [normalise(Head)|normalise(Tail)]; +normalise({op,_,'++',A,B}) -> + normalise(A) ++ normalise(B); normalise({tuple,_,Args}) -> list_to_tuple(normalise_list(Args)); normalise({map,_,Pairs0}) -> |