diff options
author | Christopher Faulet <[email protected]> | 2009-12-01 22:52:11 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-02-01 16:18:23 +0100 |
commit | 0d15f8ab1293a611831840df75ea40eee41b86a2 (patch) | |
tree | 90faa7620acf5b19d286a6be4bb4396608879438 | |
parent | 921925be3c10d86f27597f1aebdbe0cde893a06a (diff) | |
download | otp-0d15f8ab1293a611831840df75ea40eee41b86a2.tar.gz otp-0d15f8ab1293a611831840df75ea40eee41b86a2.tar.bz2 otp-0d15f8ab1293a611831840df75ea40eee41b86a2.zip |
epp: fix bug in the function scan_undef
The dict St#epp.uses that helps to find circular macros was not correctly
updated.
-rw-r--r-- | lib/stdlib/src/epp.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl index 8b702c005b..02cfd5a378 100644 --- a/lib/stdlib/src/epp.erl +++ b/lib/stdlib/src/epp.erl @@ -576,11 +576,11 @@ add_macro_uses([{Key, Def} | Rest], D0) -> %% scan_undef(Tokens, UndefToken, From, EppState) scan_undef([{'(',_Llp},{atom,_Lm,M},{')',_Lrp},{dot,_Ld}], _Undef, From, St) -> - scan_toks(From, St#epp{macs=dict:erase({atom,M}, St#epp.macs), - uses=all_macro_uses(St#epp.macs)}); + Macs = dict:erase({atom,M}, St#epp.macs) + scan_toks(From, St#epp{macs=Macs, uses=all_macro_uses(Macs)}); scan_undef([{'(',_Llp},{var,_Lm,M},{')',_Lrp},{dot,_Ld}], _Undef, From,St) -> - scan_toks(From, St#epp{macs=dict:erase({atom,M}, St#epp.macs), - uses=all_macro_uses(St#epp.macs)}); + Macs = dict:erase({atom,M}, St#epp.macs), + scan_toks(From, St#epp{macs=Macs, uses=all_macro_uses(Macs)}); scan_undef(_Toks, Undef, From, St) -> epp_reply(From, {error,{loc(Undef),epp,{bad,undef}}}), wait_req_scan(St). |