Fix errors in intentions after parser fixes

This commit is contained in:
Nikolay Krasko
2014-06-24 11:00:30 +04:00
parent d8490ce2a6
commit 0716b09920
4 changed files with 1 additions and 6 deletions
@@ -1,7 +1,5 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Boolean</td></tr><tr><td>Found:</td><td>() &rarr; kotlin.String?</td></tr></table></html>
// ERROR: Condition must be of type kotlin.Boolean, but is of type () -> kotlin.String?
fun main(args: Array<String>) {
val foo: String? = "foo"
if<caret> {
@@ -1,6 +1,4 @@
// IS_APPLICABLE: false
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Boolean</td></tr><tr><td>Found:</td><td>() &rarr; kotlin.String?</td></tr></table></html>
// ERROR: Condition must be of type kotlin.Boolean, but is of type () -> kotlin.String?
fun main(args: Array<String>) {
val foo: String? = "foo"
val bar = "bar"
@@ -1,6 +1,4 @@
// IS_APPLICABLE: false
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Boolean</td></tr><tr><td>Found:</td><td>() &rarr; kotlin.Int</td></tr></table></html>
// ERROR: Condition must be of type kotlin.Boolean, but is of type () -> kotlin.Int
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.String?
fun main(args: Array<String>) {
val foo: String? = "foo"
@@ -1,4 +1,5 @@
// IS_APPLICABLE: false
// ERROR: Expression 'if "test" is String' of type 'kotlin.Unit' cannot be invoked as a function. The function invoke() is not found
fun doSomething<T>(a: T) {}