Chronikis icon indicating copy to clipboard operation
Chronikis copied to clipboard

Need better error message for qp

Open ksvanhorn opened this issue 5 years ago • 0 comments

Expected Behaviour

qp() currently only supports constant values for certain arguments, and should produce an error message stating this when a call to qp() has a non-constant expression for one of these arguments.

Actual Behaviour

When a non-constant value is passed for the argument period, the problem is not caught until a later stage of processing, producing the unhelpful error message "toModelBody requires an argument in BasicModel form."

Sample Code that illustrates the problem

def main(rhop: real{0.0, 1.0}, sigmap: real, period: real{0.0,})
  =
  ell = 0.7;
  mindof = 6;
  qp(period, ell, mindof, rhop, sigmap)

ksvanhorn avatar Apr 24 '20 22:04 ksvanhorn