You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My first impression is that the answer to 1 should be "no", and the expressions should be evaluated when the definition is evaluated.
But that would implement that the environment of a function argument's annotation doesn't include earlier arguments. I can't remember whether that feature of the current implementaation is important and intentional for some purpose, or if it's just an artifact of the current expansion:
fun f(a, b :: Real.in(a, 10)):
"ok"
f(1, 9)
f(1, 20) // => does not satisfy annotation
In particular, do not *include* the annotation's predicate if
unchecked, which means the predicate is neither evaluated nor even
expanded. I'm not sure whether this is intended, but it seems
consistent with how other forms behave. This may deserve more
discussion at #419.
I have two questions:
Any.of
have a short-circuiting behavior?The following program showcases the difference in behavior.
The text was updated successfully, but these errors were encountered: