diff options
author | Hans Bolinder <[email protected]> | 2011-07-07 09:21:46 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2011-07-07 09:21:46 +0200 |
commit | 65affb1b983edb336f37d931fae27aa231a7cd58 (patch) | |
tree | ae52ebd88753e861e1bd3f0144108c02b8bb30e7 /lib/stdlib/src | |
parent | 47dec87a8b9c3a29a6ae48a7712aef66275e546a (diff) | |
parent | 815e3bef189e7e2d614a014a526a638ad307ee7f (diff) | |
download | otp-65affb1b983edb336f37d931fae27aa231a7cd58.tar.gz otp-65affb1b983edb336f37d931fae27aa231a7cd58.tar.bz2 otp-65affb1b983edb336f37d931fae27aa231a7cd58.zip |
Merge branch 'dev' into major
* dev:
Fix a bug in erl_scan:set_attribute/3
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/erl_scan.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl index 718ca2e91a..10b2ed2e49 100644 --- a/lib/stdlib/src/erl_scan.erl +++ b/lib/stdlib/src/erl_scan.erl @@ -408,7 +408,12 @@ set_attr(line, {Line,Column}, Fun) when ?ALINE(Line), ?COLUMN(Column) -> end; set_attr(line=Tag, Attrs, Fun) when is_list(Attrs) -> {line,Line} = lists:keyfind(Tag, 1, Attrs), - lists:keyreplace(Tag, 1, Attrs, {line,Fun(Line)}); + case lists:keyreplace(Tag, 1, Attrs, {line,Fun(Line)}) of + [{line,Ln}] when ?ALINE(Ln) -> + Ln; + As -> + As + end; set_attr(T1, T2, T3) -> erlang:error(badarg, [T1,T2,T3]). |