From 0716b0992066511f3d54e4f2443ce26f74e9d5b7 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Tue, 24 Jun 2014 11:00:30 +0400 Subject: [PATCH] Fix errors in intentions after parser fixes --- .../intentions/branched/ifThenToDoubleBang/noCondition.kt | 2 -- idea/testData/intentions/branched/ifThenToElvis/noCondition.kt | 2 -- .../intentions/branched/ifThenToSafeAccess/noCondition.kt | 2 -- idea/testData/intentions/swapBinaryExpression/is.kt | 1 + 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/idea/testData/intentions/branched/ifThenToDoubleBang/noCondition.kt b/idea/testData/intentions/branched/ifThenToDoubleBang/noCondition.kt index 92aa62d49d0..38fa33c3b29 100644 --- a/idea/testData/intentions/branched/ifThenToDoubleBang/noCondition.kt +++ b/idea/testData/intentions/branched/ifThenToDoubleBang/noCondition.kt @@ -1,7 +1,5 @@ // WITH_RUNTIME // IS_APPLICABLE: false -// ERROR: Type mismatch.
Required:kotlin.Boolean
Found:() → kotlin.String?
-// ERROR: Condition must be of type kotlin.Boolean, but is of type () -> kotlin.String? fun main(args: Array) { val foo: String? = "foo" if { diff --git a/idea/testData/intentions/branched/ifThenToElvis/noCondition.kt b/idea/testData/intentions/branched/ifThenToElvis/noCondition.kt index 4a70d1eb0bc..4328f8a0770 100644 --- a/idea/testData/intentions/branched/ifThenToElvis/noCondition.kt +++ b/idea/testData/intentions/branched/ifThenToElvis/noCondition.kt @@ -1,6 +1,4 @@ // IS_APPLICABLE: false -// ERROR: Type mismatch.
Required:kotlin.Boolean
Found:() → kotlin.String?
-// ERROR: Condition must be of type kotlin.Boolean, but is of type () -> kotlin.String? fun main(args: Array) { val foo: String? = "foo" val bar = "bar" diff --git a/idea/testData/intentions/branched/ifThenToSafeAccess/noCondition.kt b/idea/testData/intentions/branched/ifThenToSafeAccess/noCondition.kt index 6b0aff7dff3..4a4e380e71e 100644 --- a/idea/testData/intentions/branched/ifThenToSafeAccess/noCondition.kt +++ b/idea/testData/intentions/branched/ifThenToSafeAccess/noCondition.kt @@ -1,6 +1,4 @@ // IS_APPLICABLE: false -// ERROR: Type mismatch.
Required:kotlin.Boolean
Found:() → kotlin.Int
-// 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) { val foo: String? = "foo" diff --git a/idea/testData/intentions/swapBinaryExpression/is.kt b/idea/testData/intentions/swapBinaryExpression/is.kt index 40ffa670a91..b94334880a8 100644 --- a/idea/testData/intentions/swapBinaryExpression/is.kt +++ b/idea/testData/intentions/swapBinaryExpression/is.kt @@ -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(a: T) {}