Lambda --> reference: correct handling of parameter-less function
Issue #KT-15556 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class Foo
|
||||
fun usage(f: () -> Foo) {}
|
||||
fun test() {
|
||||
usage {<caret> Foo() }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Foo
|
||||
fun usage(f: () -> Foo) {}
|
||||
fun test() {
|
||||
usage(::Foo)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// IS_APPLICABLE: false
|
||||
// IS_APPLICABLE: true
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// IS_APPLICABLE: true
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
listOf(1).forEach { run(it::bar) }
|
||||
}
|
||||
|
||||
fun Int.bar() {
|
||||
}
|
||||
Reference in New Issue
Block a user