diff options
author | Hans Bolinder <[email protected]> | 2015-08-20 08:50:58 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2015-08-21 08:26:18 +0200 |
commit | 4732b2e14710cc6287df82ddcf1bb7d8777706a9 (patch) | |
tree | b3b9b80f9259639abd9fafba9245e9ca666f5e28 /lib/stdlib/src/qlc_pt.erl | |
parent | e3a5ad489d6e6cc190b609f8648b6af993c1b333 (diff) | |
download | otp-4732b2e14710cc6287df82ddcf1bb7d8777706a9.tar.gz otp-4732b2e14710cc6287df82ddcf1bb7d8777706a9.tar.bz2 otp-4732b2e14710cc6287df82ddcf1bb7d8777706a9.zip |
stdlib: fix a qlc bug introduced in 18.0
As pointed out by roowe, qlc does not handle errors in early compiler
(scanner, parser) well in OTP 18.0.
Diffstat (limited to 'lib/stdlib/src/qlc_pt.erl')
-rw-r--r-- | lib/stdlib/src/qlc_pt.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/stdlib/src/qlc_pt.erl b/lib/stdlib/src/qlc_pt.erl index 4e81e2c2dd..9577d17a85 100644 --- a/lib/stdlib/src/qlc_pt.erl +++ b/lib/stdlib/src/qlc_pt.erl @@ -428,7 +428,13 @@ compile_errors(FormsNoShadows) -> end. compile_forms(Forms0, Options) -> - Forms = [F || F <- Forms0, element(1, F) =/= eof] ++ [{eof,anno0()}], + Exclude = fun(eof) -> true; + (warning) -> true; + (error) -> true; + (_) -> false + end, + Forms = ([F || F <- Forms0, not Exclude(element(1, F))] + ++ [{eof,anno0()}]), try case compile:noenv_forms(Forms, compile_options(Options)) of {ok, _ModName, Ws0} -> |