From 7493d97d7f8211cb60d52a5cb6af9fb9983b84fa Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Fri, 4 Jun 2010 10:16:32 +0200 Subject: Add warnings for shadowed variables in ms_transform funs Also changed compiler to allow for warnings in parse_transforms. --- lib/compiler/src/compile.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/compiler/src/compile.erl') diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index 4642fb68b3..39c4620da1 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -819,6 +819,10 @@ foldl_transform(St, [T|Ts]) -> {'EXIT',R} -> Es = [{St#compile.ifile,[{none,compile,{parse_transform,T,R}}]}], {error,St#compile{errors=St#compile.errors ++ Es}}; + {warning, Forms, Ws} -> + foldl_transform( + St#compile{code=Forms, + warnings=St#compile.warnings ++ Ws}, Ts); Forms -> foldl_transform(St#compile{code=Forms}, Ts) end; -- cgit v1.2.3