Override/Implement: Add test to cover import optimization in the case of multiple import insertion (see #KT-4732)

This commit is contained in:
Alexey Sedunov
2014-06-19 16:17:56 +04:00
parent 5be7eb8a5c
commit 6bc3772d29
6 changed files with 52 additions and 0 deletions
@@ -0,0 +1,5 @@
package bar;
public interface Bar {
}
@@ -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
@@ -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