mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-14 00:21:34 +00:00
Intentions: 'Implement abstract member' (Kotlin -> Java)
#KT-8467 Fixed
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package source;
|
||||
|
||||
abstract class X<S> implements T<S> {
|
||||
|
||||
@Override
|
||||
public S foo(S s) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Y implements T<String> {
|
||||
|
||||
@Override
|
||||
public String foo(String s) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Z implements T<Boolean> {
|
||||
@Override
|
||||
public Boolean foo(Boolean b) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
interface U extends T<Object> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package source
|
||||
|
||||
interface T<X> {
|
||||
fun foo(x: X): X
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package source;
|
||||
|
||||
abstract class X<S> implements T<S> {
|
||||
|
||||
}
|
||||
|
||||
class Y implements T<String> {
|
||||
|
||||
}
|
||||
|
||||
class Z implements T<Boolean> {
|
||||
@Override
|
||||
public Boolean foo(Boolean b) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
interface U extends T<Object> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package source
|
||||
|
||||
interface T<X> {
|
||||
fun <caret>foo(x: X): X
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"mainFile": "source/test.kt",
|
||||
"intentionClass": "org.jetbrains.kotlin.idea.intentions.ImplementAbstractMemberIntention",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user