Create from Usage: Use function form when rendering FunctionN types
#KT-7522 Fixed
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create member function 'foo'" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun foo(t: T, s: String, function: Function1<T, T>): A<T> {
|
||||
fun foo(t: T, s: String, function: (T) -> T): A<T> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create member function 'foo'" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun foo(function: Function1<T, T>): A<T> {
|
||||
fun foo(function: (T) -> T): A<T> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Create function 'bar'" "true"
|
||||
|
||||
fun foo(block: (Int) -> String) {
|
||||
<caret>bar(block)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Create function 'bar'" "true"
|
||||
|
||||
fun foo(block: (Int) -> String) {
|
||||
bar(block)
|
||||
}
|
||||
|
||||
fun bar(block: (Int) -> String) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
Reference in New Issue
Block a user