From a6e1d801ebd4e5156d23653da4d3af6623cefb01 Mon Sep 17 00:00:00 2001 From: Benjamin Desef Date: Wed, 8 May 2024 18:36:51 +0200 Subject: [PATCH] Error for partial substitutions --- src/subs.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/subs.jl b/src/subs.jl index 1792097..a7a5e62 100644 --- a/src/subs.jl +++ b/src/subs.jl @@ -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( @@ -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