[java-highlighting] test-data adjusted (mostly anchors) after recent updates

Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: 1e1b77009dc78de49c7cc5c44d4704937397bb23
This commit is contained in:
Tagir Valeev
2025-01-28 16:03:09 +01:00
committed by intellij-monorepo-bot
parent db46304375
commit c449c341b7
103 changed files with 211 additions and 211 deletions

View File

@@ -11,12 +11,12 @@ class Test {
}
void test(boolean cond) {
<error descr="Ambiguous method call: both 'Test.m(GetInt)' and 'Test.m(GetInteger)' match">m</error>(() -> {
m<error descr="Ambiguous method call: both 'Test.m(GetInt)' and 'Test.m(GetInteger)' match">(() -> {
if (cond)
return 42;
else
return foo();
});
})</error>;
m(() -> {
return foo();

View File

@@ -14,7 +14,7 @@ class Test {
}
void fooBar(IntStream1 instr){
Supplier<Stream<Integer>> si = () -> instr.<error descr="Ambiguous method call: both 'IntStream1.map(IntFunction<Integer>)' and 'IntStream1.map(IntUnaryOperator)' match">map</error> ((i) -> (( i % 2) == 0) ? i : -i).boxed();
Supplier<Stream<Integer>> si = () -> instr.map <error descr="Ambiguous method call: both 'IntStream1.map(IntFunction<Integer>)' and 'IntStream1.map(IntUnaryOperator)' match">((i) -> (( i % 2) == 0) ? i : -i)</error>.boxed();
System.out.println(si);
Supplier<Stream<Integer>> si1 = () -> instr.map <error descr="Ambiguous method call: both 'IntStream1.map(IntFunction<Integer>)' and 'IntStream1.map(IntUnaryOperator)' match">(null)</error>.boxed();
System.out.println(si1);

View File

@@ -12,6 +12,6 @@ abstract class PertinentToApplicabilityOfExplicitlyTypedLambdaTest {
abstract void foo(B b);
{
<error descr="Ambiguous method call: both 'PertinentToApplicabilityOfExplicitlyTypedLambdaTest.foo(A)' and 'PertinentToApplicabilityOfExplicitlyTypedLambdaTest.foo(B)' match">foo</error>(<warning descr="Parameter 'x' is never used">x</warning> -> <warning descr="Parameter 'y' is never used">y</warning> -> 42);
foo<error descr="Ambiguous method call: both 'PertinentToApplicabilityOfExplicitlyTypedLambdaTest.foo(A)' and 'PertinentToApplicabilityOfExplicitlyTypedLambdaTest.foo(B)' match">(<warning descr="Parameter 'x' is never used">x</warning> -> <warning descr="Parameter 'y' is never used">y</warning> -> 42)</error>;
}
}

View File

@@ -9,6 +9,6 @@ class B extends A {
static void foo(IntFunction<String> f) {}
public static void main(String[] args) {
<error descr="Ambiguous method call: both 'B.foo(IntFunction<String>)' and 'A.foo(Function<String, String>)' match">foo</error>(a -> "1");
foo<error descr="Ambiguous method call: both 'B.foo(IntFunction<String>)' and 'A.foo(Function<String, String>)' match">(a -> "1")</error>;
}
}

View File

@@ -14,6 +14,6 @@ class Main {
}
{
<error descr="Ambiguous method call: both 'Main.perform(Runnable)' and 'Main.perform(TRunnable<Throwable>)' match">perform</error>(() -> {});
perform<error descr="Ambiguous method call: both 'Main.perform(Runnable)' and 'Main.perform(TRunnable<Throwable>)' match">(() -> {})</error>;
}
}

View File

@@ -14,10 +14,10 @@ abstract class Test {
foo(x -> {
return x += 1;
});
<error descr="Ambiguous method call: both 'Test.foo(A)' and 'Test.foo(B)' match">foo</error>(x -> x += 1);
foo<error descr="Ambiguous method call: both 'Test.foo(A)' and 'Test.foo(B)' match">(x -> x += 1)</error>;
foo(<warning descr="Parameter 'x' is never used">x</warning> -> 1);
foo(x -> <error descr="Operator '!' cannot be applied to 'int'">!x</error>);
<error descr="Ambiguous method call: both 'Test.foo(A)' and 'Test.foo(B)' match">foo</error>(x -> ++x);
foo<error descr="Ambiguous method call: both 'Test.foo(A)' and 'Test.foo(B)' match">(x -> ++x)</error>;
foo(<warning descr="Parameter 'x' is never used">x</warning> -> o instanceof String ? 1 : 0);
}
}