JacquelineCasey / Nom

0 stars 0 forks source link

Else statement #18

Closed JacquelineCasey closed 1 year ago

JacquelineCasey commented 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...

JacquelineCasey commented 1 year ago

One test should be an expressional if.

...
val c = a + if ... { ... } else { ... } + b
JacquelineCasey commented 1 year ago

Done. Surprisingly easy.