Create from usage (function/property): Suggest separate actions for extensions and non-extension declarations
#KT-6023 Fixed
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'plus'" "true"
|
||||
// "Create extension function 'plus'" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'plus'" "true"
|
||||
// "Create extension function 'plus'" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
fun test() {
|
||||
val a: Int = Unit.foo(2)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
fun test() {
|
||||
val a: Int = Unit.<caret>foo(2)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
// ERROR: Unresolved reference: foo
|
||||
|
||||
fun test(): Int {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
// ERROR: Unresolved reference: foo
|
||||
|
||||
fun test(): Int {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
class A<T>(val items: List<T>) {
|
||||
fun test(): Int {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'component2'" "true"
|
||||
// "Create extension function 'component2'" "true"
|
||||
class FooIterator<T> {
|
||||
fun hasNext(): Boolean { return false }
|
||||
fun next(): Any {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'component2'" "true"
|
||||
// "Create extension function 'component2'" "true"
|
||||
class FooIterator<T> {
|
||||
fun hasNext(): Boolean { return false }
|
||||
fun next(): Any {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'get'" "true"
|
||||
// "Create extension function 'get'" "true"
|
||||
fun x (y: Any) {
|
||||
val z: Any = y[""]
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'get'" "true"
|
||||
// "Create extension function 'get'" "true"
|
||||
fun x (y: Any) {
|
||||
val z: Any = y<caret>[""]
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'invoke'" "true"
|
||||
// "Create extension function 'invoke'" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'invoke'" "true"
|
||||
// "Create extension function 'invoke'" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'set'" "true"
|
||||
// "Create extension function 'set'" "true"
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'set'" "true"
|
||||
// "Create extension function 'set'" "true"
|
||||
|
||||
class Foo<T> {
|
||||
fun <T> x (y: Any, w: java.util.ArrayList<T>) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'minus'" "true"
|
||||
// "Create extension function 'minus'" "true"
|
||||
|
||||
fun test() {
|
||||
val a = -false
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Create function 'minus'" "true"
|
||||
// "Create extension function 'minus'" "true"
|
||||
|
||||
fun test() {
|
||||
val a = <caret>-false
|
||||
|
||||
Reference in New Issue
Block a user