Skip to content

Commit

Permalink
ParamCheck.m: Bypass bug in checkCondition
Browse files Browse the repository at this point in the history
The "params" variable is never initialised, so the code as written is wrong.  Bypass the corresponding check until the parameters are passed in.
  • Loading branch information
ianhinder committed Sep 12, 2013
1 parent 72837a1 commit fa7c5ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tools/CodeGen/ParamCheck.m
Expand Up @@ -73,8 +73,9 @@
(* rendervalue[a_String] := a; -- Allow literal pass-through *)
rendervalue[a_?NumberQ] := ToString[a];
rendervalue[Parameter[a_String]] := a;
rendervalue[a_ /; MemberQ[params,a]] := ToString[a];
rendervalue[x_] := ThrowError["Unexpected value in run-time conditional expression (value):", x, "in", cond];
(* TODO: pass in valid parameters *)
rendervalue[a_ (*/; MemberQ[params,a] *) ] := ToString[a];
(* rendervalue[x_] := ThrowError["Unexpected value in run-time conditional expression (value):", x, "in", cond]; *)

ConditionalOnParameterTextual[
renderbool[cond],
Expand Down

0 comments on commit fa7c5ce

Please sign in to comment.