Fix false positive for type error in intentions AddReturnTo...
Relates to #KT-25272
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// "Add 'return' to last expression" "false"
|
||||
// WITH_RUNTIME
|
||||
// ACTION: Introduce local variable
|
||||
// ACTION: Remove explicitly specified return type of enclosing function 'some'
|
||||
// ERROR: A 'return' expression required in a function with a block body ('{...}')
|
||||
// ERROR: Unresolved reference: FunctionReference
|
||||
|
||||
fun some(): FunctionReference {
|
||||
Int::class
|
||||
}<caret>
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Add 'return' to last expression" "false"
|
||||
// WITH_RUNTIME
|
||||
// ACTION: Introduce local variable
|
||||
// ACTION: Remove explicitly specified return type of enclosing function 'some'
|
||||
// ERROR: A 'return' expression required in a function with a block body ('{...}')
|
||||
// ERROR: Unresolved reference: FunctionReference
|
||||
|
||||
fun some(): Any {
|
||||
FunctionReference::class
|
||||
}<caret>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Add 'return' before the expression" "false"
|
||||
// WITH_RUNTIME
|
||||
// ACTION: Introduce import alias
|
||||
// ACTION: Introduce local variable
|
||||
// ERROR: A 'return' expression required in a function with a block body ('{...}')
|
||||
// ERROR: Unresolved reference: FunctionReference
|
||||
|
||||
fun some(): FunctionReference {
|
||||
Int<caret>::class
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// "Add 'return' before the expression" "false"
|
||||
// WITH_RUNTIME
|
||||
// ACTION: Create local variable 'FunctionReference'
|
||||
// ACTION: Create object 'FunctionReference'
|
||||
// ACTION: Create parameter 'FunctionReference'
|
||||
// ACTION: Create property 'FunctionReference'
|
||||
// ACTION: Create annotation 'FunctionReference'
|
||||
// ACTION: Create class 'FunctionReference'
|
||||
// ACTION: Create enum 'FunctionReference'
|
||||
// ACTION: Create interface 'FunctionReference'
|
||||
// ACTION: Introduce local variable
|
||||
// ACTION: Rename reference
|
||||
// ERROR: Unresolved reference: FunctionReference
|
||||
|
||||
fun some() {
|
||||
FunctionReference<caret>::class
|
||||
}
|
||||
Reference in New Issue
Block a user