Error on 'if' without an 'else' branch when used as an expression

This commit is contained in:
Yan Zhulanow
2015-10-13 18:13:51 +03:00
parent de5dc61820
commit e14c9645dc
29 changed files with 121 additions and 91 deletions
+2 -2
View File
@@ -4,9 +4,9 @@ class A (val p: String, p1: String, p2: String) {
var cond2: String = ""
val prop1 = if (cond1(p)) p1
val prop1 = if (cond1(p)) p1 else null
val prop2 = if (cond2(p)) else;
val prop2 = if (cond2(p)) p2 else null;
fun cond1(p: String): Boolean {