Hello, I am learning Crystal and am exploring the syntax. Few days ago I wanted to try the expression:
if x == 10 true else false end, that seemed to throw an error:
Error: unexpected token: true. However, the multiline version of this works, and in single line version, any other value than a
Bool works (i.e.
if x == 10 :true else false end works). Is there any particular reason why a
Bool wouldn’t work in a one liner conditional?