mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 06:11:42 +07:00
method reference: additional diagnostics for invalid method references (IDEA-149688)
This commit is contained in:
+4
-4
@@ -54,7 +54,7 @@ class MyTest1 {
|
||||
}
|
||||
|
||||
{
|
||||
Bar1 b1 = MyTest2 :: <error descr="Cannot resolve method 'foo'">foo</error>;
|
||||
Bar1 b1 = MyTest2 :: <error descr="Invalid method reference: String cannot be converted to int">foo</error>;
|
||||
bar(MyTest1 :: foo);
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ class MyTest2 {
|
||||
}*/
|
||||
|
||||
{
|
||||
Bar1 b1 = MyTest2 :: <error descr="Cannot resolve method 'foo'">foo</error>;
|
||||
Bar1 b1 = MyTest2 :: <error descr="Invalid method reference: String cannot be converted to int">foo</error>;
|
||||
bar(MyTest2 :: foo);
|
||||
}
|
||||
}
|
||||
@@ -106,8 +106,8 @@ class MyTest3 {
|
||||
}
|
||||
|
||||
{
|
||||
Bar1 b1 = MyTest2 :: <error descr="Cannot resolve method 'foo'">foo</error>;
|
||||
bar(MyTest3 :: <error descr="Cannot resolve method 'foo'">foo</error>);
|
||||
Bar1 b1 = MyTest2 :: <error descr="Invalid method reference: String cannot be converted to int">foo</error>;
|
||||
bar(MyTest3 :: <error descr="Invalid method reference: int cannot be converted to String">foo</error>);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ class Test {
|
||||
{
|
||||
Runnable b = Test :: <error descr="Cannot resolve method 'length'">length</error>;
|
||||
Comparable<String> c = Test :: length;
|
||||
Comparable<Integer> c1 = Test :: <error descr="Cannot resolve method 'length'">length</error>;
|
||||
Comparable<Integer> c1 = Test :: <error descr="Invalid method reference: Integer cannot be converted to String">length</error>;
|
||||
}
|
||||
|
||||
public static Integer length(String s) {
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ class MyTest {
|
||||
static {
|
||||
I1 i1 = MyTest::static_1;
|
||||
I1 i2 = MyTest::<error descr="Cannot resolve method 'static_2'">static_2</error>;
|
||||
I1 i3 = MyTest::<error descr="Cannot resolve method 'static_3'">static_3</error>;
|
||||
I1 i3 = MyTest::<error descr="Invalid method reference: int cannot be converted to String">static_3</error>;
|
||||
I1 i4 = MyTest::<error descr="Cannot resolve method 'static_4'">static_4</error>;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class MyTest {
|
||||
|
||||
I1 i1 = this::_1;
|
||||
I1 i2 = this::<error descr="Cannot resolve method '_2'">_2</error>;
|
||||
I1 i3 = this::<error descr="Cannot resolve method '_3'">_3</error>;
|
||||
I1 i3 = this::<error descr="Invalid method reference: int cannot be converted to String">_3</error>;
|
||||
I1 i4 = this::<error descr="Cannot resolve method '_4'">_4</error>;
|
||||
|
||||
I2 i21 = MyTest::<error descr="Cannot resolve method 'm1'">m1</error>;
|
||||
|
||||
Reference in New Issue
Block a user