Typechecker logic fixed for one-branch ifs and 'return x' for Unit-returning functions

This commit is contained in:
Andrey Breslav
2011-04-07 14:43:25 +04:00
parent e61e908ab7
commit 30d8349272
7 changed files with 39 additions and 15 deletions
@@ -3,6 +3,8 @@
fun unitEmptyInfer() {}
fun unitEmpty() : Unit {}
fun unitEmptyReturn() : Unit {return}
fun unitIntReturn() : Unit {return <error>1</error>}
fun unitUnitReturn() : Unit {return ()}
fun unitShort() : Unit = ()
fun unitShortConv() : Unit = 1
fun unitShortNull() : Unit = null