When a compile-time error occurs due to the value to refine not being evaluable at compile-time, the message can be quite confusing for newcomers. It would be useful to detect some easy mistakes (such as forgetting an inline) when such error occurs and provide a better message accordingly.
Example:
val notInlined: Int = 5
val pos: Int :| Positive = notInlined //`notInlined` is not a non-inlined variable. You need to make it `inline` in order to check it at compile-time etc.
Errors worth detecting are:
Condition not evaluable
Value of a non evaluable type (because lack of FromExpr). This will be especially useful for future versions. See #147
Value not evaluable due to a variable/method not being inlined
When a compile-time error occurs due to the value to refine not being evaluable at compile-time, the message can be quite confusing for newcomers. It would be useful to detect some easy mistakes (such as forgetting an
inline
) when such error occurs and provide a better message accordingly.Example:
Errors worth detecting are:
FromExpr
). This will be especially useful for future versions. See #147