Quick Fixes: Use simple class name in "Change function return type" quickfix

#KT-12919 Fixed
This commit is contained in:
Alexey Sedunov
2016-07-26 17:57:41 +03:00
parent f57c9279f9
commit 75573bd6a5
13 changed files with 142 additions and 2 deletions
@@ -0,0 +1,10 @@
// "Change 'foo' function return type to 'Int'" "true"
package foo.bar
fun test() {
val o = object {
fun foo(): String {
return <caret>1
}
}
}
@@ -0,0 +1,10 @@
// "Change 'foo' function return type to 'Int'" "true"
package foo.bar
fun test() {
val o = object {
fun foo(): Int {
return 1
}
}
}
@@ -0,0 +1,11 @@
// "Change 'Companion.foo' function return type to 'Int'" "true"
package foo.bar
class A {
companion object {
fun foo(): String {
return <caret>1
}
}
}
@@ -0,0 +1,11 @@
// "Change 'Companion.foo' function return type to 'Int'" "true"
package foo.bar
class A {
companion object {
fun foo(): Int {
return 1
}
}
}
@@ -0,0 +1,10 @@
// "Change 'A.foo' function return type to 'Int'" "true"
package foo.bar
fun test() {
class A {
fun foo(): String {
return <caret>1
}
}
}
@@ -0,0 +1,10 @@
// "Change 'A.foo' function return type to 'Int'" "true"
package foo.bar
fun test() {
class A {
fun foo(): Int {
return 1
}
}
}
@@ -0,0 +1,11 @@
// "Change 'B.foo' function return type to 'Int'" "true"
package foo.bar
class A {
class B {
fun foo(): String {
return <caret>1
}
}
}
@@ -0,0 +1,11 @@
// "Change 'B.foo' function return type to 'Int'" "true"
package foo.bar
class A {
class B {
fun foo(): Int {
return 1
}
}
}
@@ -0,0 +1,9 @@
// "Change 'A.foo' function return type to 'Int'" "true"
package foo.bar
class A {
fun foo(): String {
return <caret>1
}
}
@@ -0,0 +1,9 @@
// "Change 'A.foo' function return type to 'Int'" "true"
package foo.bar
class A {
fun foo(): Int {
return 1
}
}