Override/Implement: Add test to cover import optimization in the case of multiple import insertion (see #KT-4732)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
package bar;
|
||||
|
||||
public interface Bar {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package bar;
|
||||
|
||||
public interface Other {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package foo;
|
||||
|
||||
import bar.Bar;
|
||||
import bar.Other;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Foo {
|
||||
abstract public Bar foo(ArrayList<Integer> list, Other other);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package foo
|
||||
|
||||
class Impl: Foo() {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// KT-4732 Override/Implement action does not add all imports when "Optimize imports on the fly" is enabled
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package foo
|
||||
|
||||
import java.util.ArrayList
|
||||
import bar.Other
|
||||
import bar.Bar
|
||||
|
||||
class Impl: Foo() {
|
||||
|
||||
override fun foo(list: ArrayList<Int>?, other: Other?): Bar? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
// KT-4732 Override/Implement action does not add all imports when "Optimize imports on the fly" is enabled
|
||||
Reference in New Issue
Block a user