Skip to content

Commit

Permalink
Fix ! for Const
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
bowenszhu committed Aug 29, 2024
1 parent 678507c commit 7ddad9c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,13 @@ end
for f in [!, ~]
@eval begin
promote_symtype(::$(typeof(f)), ::Type{<:Bool}) = Bool
(::$(typeof(f)))(s::Symbolic{Bool}) = _Term(Bool, !, [s])
function (::$(typeof(f)))(s::Symbolic{Bool})
if isconst(s)
s = s.impl.val
return !s
end
_Term(Bool, !, [s])
end
end
end

Expand Down

0 comments on commit 7ddad9c

Please sign in to comment.