Skip to content

Commit

Permalink
Simplify PR wrt jump-dev#2228.
Browse files Browse the repository at this point in the history
  • Loading branch information
dourouc05 committed Apr 22, 2020
1 parent 36e1430 commit 40d764d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/indicator.jl
Expand Up @@ -34,7 +34,7 @@ function parse_one_operator_constraint(
_error("Invalid right-hand side `$(rhs)` of indicator constraint. Expected constraint surrounded by `{` and `}`.")
end
rhs_con = rhs.args[1]
rhs_vectorized, rhs_parsecode, rhs_buildcall = parse_constraint(_error, Val(rhs_con.head), rhs_con.args...)
rhs_vectorized, rhs_parsecode, rhs_buildcall = parse_constraint(_error, rhs_con.head, rhs_con.args...)
if vectorized != rhs_vectorized
_error("Inconsistent use of `.` in symbols to indicate vectorization.")
end
Expand Down
4 changes: 2 additions & 2 deletions src/macros.jl
Expand Up @@ -386,7 +386,7 @@ function _constraint_macro(args, macro_name::Symbol, parsefun::Function)
# in a function returning `ConstraintRef`s and give it to `Containers.container`.
idxvars, indices = Containers._build_ref_sets(_error, c)

vectorized, parsecode, buildcall = parsefun(_error, Val(x.head), x.args...)
vectorized, parsecode, buildcall = parsefun(_error, x.head, x.args...)
_add_kw_args(buildcall, kw_args)
if vectorized
# TODO: Pass through names here.
Expand Down Expand Up @@ -598,7 +598,7 @@ macro build_constraint(constraint_expr)
end

is_vectorized, parse_code, build_call = parse_constraint(
_error, Val(constraint_expr.head), constraint_expr.args...)
_error, constraint_expr.head constraint_expr.args...)
result_variable = gensym()
code = quote
$parse_code
Expand Down

0 comments on commit 40d764d

Please sign in to comment.