Skip to content

Commit

Permalink
Error for partial substitutions
Browse files Browse the repository at this point in the history
  • Loading branch information
projekter committed May 8, 2024
1 parent 6c230f6 commit a6e1d80
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/subs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ function fillmap!(
value = real(s.second) # just to make sure the type is correct
if vars[j].kind == REAL_PART
vals[j] = value
elseif vars[j].kind != IMAG_PART
error("Found complex variable with substitution of real part - not implemented")
end
# don't do a partial substitution
else
@assert(s.first.kind == IMAG_PART)
isreal(s.second) || error(
Expand All @@ -61,8 +62,9 @@ function fillmap!(
value = real(s.second) # just to make sure the type is correct
if vars[j].kind == IMAG_PART
vals[j] = value
elseif vars[j].kind != REAL_PART
error("Found complex variable with substitution of imaginary part - not implemented")
end
# don't do a partial substitution
end
end
end
Expand Down

0 comments on commit a6e1d80

Please sign in to comment.