Parameter <-> Receiver Conversion: Support header/impl declarations
#KT-18907 Fixed
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
// "Convert receiver to parameter" "true"
|
||||
|
||||
header class Foo {
|
||||
fun <caret>String.foo(n: Int)
|
||||
}
|
||||
|
||||
fun Foo.test() {
|
||||
"1".foo(2)
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// "Convert receiver to parameter" "true"
|
||||
|
||||
header class Foo {
|
||||
fun foo(s: String, n: Int)
|
||||
}
|
||||
|
||||
fun Foo.test() {
|
||||
foo("1", 2)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
impl class Foo {
|
||||
impl fun String.foo(n: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun Foo.test() {
|
||||
"1".foo(2)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
impl class Foo {
|
||||
impl fun foo(s: String, n: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun Foo.test() {
|
||||
foo("1", 2)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
impl class Foo {
|
||||
impl fun String.foo(n: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun Foo.test() {
|
||||
"1".foo(2)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
impl class Foo {
|
||||
impl fun foo(s: String, n: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun Foo.test() {
|
||||
foo("1", 2)
|
||||
}
|
||||
Reference in New Issue
Block a user