Extract Function: Add backticks to non-identifiers and references originally surrounded in backticks
#KT-8192 Fixed
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// PARAM_TYPES: X
|
||||
// PARAM_TYPES: Y
|
||||
// PARAM_DESCRIPTOR: internal final fun X.test(): kotlin.Unit defined in Y
|
||||
// PARAM_DESCRIPTOR: internal final class Y defined in root package
|
||||
class X(val x: Int)
|
||||
|
||||
// SIBLING:
|
||||
class Y(val y: Int) {
|
||||
fun X.test() {
|
||||
<selection>`x`plus y</selection>
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// PARAM_TYPES: X
|
||||
// PARAM_TYPES: Y
|
||||
// PARAM_DESCRIPTOR: internal final fun X.test(): kotlin.Unit defined in Y
|
||||
// PARAM_DESCRIPTOR: internal final class Y defined in root package
|
||||
class X(val x: Int)
|
||||
|
||||
// SIBLING:
|
||||
class Y(val y: Int) {
|
||||
fun X.test() {
|
||||
__dummyTestFun__(this, this@Y)
|
||||
}
|
||||
}
|
||||
|
||||
private fun __dummyTestFun__(x: X, y1: Y) {
|
||||
x.`x`plus y1.y
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: val i: kotlin.Int defined in test
|
||||
fun test() {
|
||||
val `i` = 0
|
||||
<selection>`i`plus i</selection>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: val i: kotlin.Int defined in test
|
||||
fun test() {
|
||||
val `i` = 0
|
||||
__dummyTestFun__(`i`)
|
||||
}
|
||||
|
||||
private fun __dummyTestFun__(`i`: Int) {
|
||||
`i`plus i
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: val 0: kotlin.Int defined in test
|
||||
fun test() {
|
||||
val `0` = 0
|
||||
<selection>`0`plus 1</selection>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: val 0: kotlin.Int defined in test
|
||||
fun test() {
|
||||
val `0` = 0
|
||||
__dummyTestFun__(`0`)
|
||||
}
|
||||
|
||||
private fun __dummyTestFun__(`0`: Int) {
|
||||
`0`plus 1
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: val i: kotlin.Int defined in test
|
||||
fun test() {
|
||||
val i = 0
|
||||
<selection>`i`plus i</selection>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: val i: kotlin.Int defined in test
|
||||
fun test() {
|
||||
val i = 0
|
||||
__dummyTestFun__(`i`)
|
||||
}
|
||||
|
||||
private fun __dummyTestFun__(i: Int) {
|
||||
`i`plus i
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: val i: kotlin.Int defined in test
|
||||
fun test() {
|
||||
val i = 0
|
||||
<selection>i plus `i`</selection>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: val i: kotlin.Int defined in test
|
||||
fun test() {
|
||||
val i = 0
|
||||
__dummyTestFun__(i)
|
||||
}
|
||||
|
||||
private fun __dummyTestFun__(i: Int) {
|
||||
i plus `i`
|
||||
}
|
||||
Reference in New Issue
Block a user