k = x -> x > 5 ? "foo" : "bar"
works perfectly fine, but
k = x -> x > 5 ? return "foo" : return "bar"
returns
ERROR: syntax: colon expected in "?" expression
I’m running julia 0.6.2.
I just spent 10 minutes wondering if my “:” is colon or some other random character which looks just like colon. I know ? expression doesn’t allow statements, but error message could be clearer.