Closed JacquelineCasey closed 1 year ago
We have if statements expressions, now time for else blocks.
Be delicate with the syntax here - we want else-if for free of course.
Also, make sure that the type of an if-else expression is computed correctly.
Note - may require better type unification - easier said than done...
One test should be an expressional if.
... val c = a + if ... { ... } else { ... } + b
Done. Surprisingly easy.
We have if statements expressions, now time for else blocks.
Be delicate with the syntax here - we want else-if for free of course.
Also, make sure that the type of an if-else expression is computed correctly.
Note - may require better type unification - easier said than done...