KT-411 Wrong type expected when returning from a function literal

This commit is contained in:
svtk
2011-11-09 16:43:29 +04:00
parent 7c05e4b9b4
commit 0356bd98ec
13 changed files with 133 additions and 26 deletions
@@ -5,7 +5,7 @@ fun unitEmpty() : Unit {}
fun unitEmptyReturn() : Unit {return}
fun unitIntReturn() : Unit {return <error>1</error>}
fun unitUnitReturn() : Unit {return ()}
fun test1() : Any = {return}
fun test1() : Any = { <error>return</error> }
fun test2() : Any = @a {return@a 1}
fun test3() : Any { <error>return</error> }