Fix "Specify explicit lambda signature" when no parameters exists
So #KT-15075 Fixed
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// IS_APPLICABLE: true
|
||||
// SKIP_ERRORS_BEFORE
|
||||
// ERROR: Modifier 'override' is not applicable to 'local function'
|
||||
// ERROR: Type mismatch: inferred type is () -> Unit but Base was expected
|
||||
|
||||
// See also KT-15075
|
||||
|
||||
interface Base {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
class Derived : Base by <caret>{
|
||||
override fun foo() {}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// IS_APPLICABLE: true
|
||||
// SKIP_ERRORS_BEFORE
|
||||
// ERROR: Modifier 'override' is not applicable to 'local function'
|
||||
// ERROR: Type mismatch: inferred type is () -> Unit but Base was expected
|
||||
|
||||
// See also KT-15075
|
||||
|
||||
interface Base {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
class Derived : Base by {
|
||||
->
|
||||
override fun foo() {}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun bar() {}
|
||||
|
||||
fun foo() {
|
||||
run <caret>{
|
||||
bar()
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun bar() {}
|
||||
|
||||
fun foo() {
|
||||
run {
|
||||
->
|
||||
bar()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user