Convert to lambda: report at INFORMATION level if anonymous object super type does not match function parameter type exactly
#KT-28081 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
3649e61c2f
commit
0075e90042
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.intentions.ObjectLiteralToLambdaInspection
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
@FunctionalInterface
|
||||
public interface Foo {
|
||||
void foo();
|
||||
}
|
||||
|
||||
public interface Bar {
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
public interface FooBar extends Foo, Bar {
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
@FunctionalInterface
|
||||
public interface Foo {
|
||||
void foo();
|
||||
}
|
||||
|
||||
public interface Bar {
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
public interface FooBar extends Foo, Bar {
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// HIGHLIGHT: INFORMATION
|
||||
fun main() {
|
||||
test("", <caret>object : FooBar {
|
||||
override fun foo() {
|
||||
}
|
||||
}, 1)
|
||||
}
|
||||
|
||||
fun test(s: String, foo: Foo, i: Int) {}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// HIGHLIGHT: INFORMATION
|
||||
fun main() {
|
||||
test("", FooBar { }, 1)
|
||||
}
|
||||
|
||||
fun test(s: String, foo: Foo, i: Int) {}
|
||||
Reference in New Issue
Block a user