JET-113 Check returns in secondary constructors

This commit is contained in:
Andrey Breslav
2011-06-17 18:31:51 +04:00
parent 03460e2bcc
commit 6d1823ac2a
3 changed files with 48 additions and 34 deletions
+10 -1
View File
@@ -110,4 +110,13 @@ fun blockReturnValueTypeMatch() : Int {
else return <error>1.0</error>
}
val a = <error>return 1</error>
val a = <error>return 1</error>
class A() {
this(a : Int) : this() {
if (a == 1)
return
return <error>1</error>
}
}