Browse Source

don't consider non-user-variables when checking effects (closes #5581)

Simon Krajewski 9 years ago
parent
commit
58f4c414c8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/display/display.ml

+ 2 - 0
src/display/display.ml

@@ -410,6 +410,8 @@ module Diagnostics = struct
 			| TMeta((Meta.Extern,_,_),_) ->
 				(* This is so something like `[inlineFunc()]` is not reported. *)
 				had_effect := true;
+			| TLocal v when not (Meta.has Meta.UserVariable v.v_meta) ->
+				()
 			| TConst _ | TLocal _ | TTypeExpr _ | TFunction _ when not in_value ->
 				no_effect e.epos;
 			| TConst _ | TLocal _ | TTypeExpr _ | TEnumParameter _ | TVar _ ->