mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
EditorConfig documentation test
GitOrigin-RevId: fd52ace3d7a32ecd02c2c5ab90e077967604c15e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e6e3eaa09d
commit
123242c4b2
@@ -77,7 +77,7 @@ abstract class AbstractCollection<E> implements Collection<E> {
|
||||
public boolean add(E e) {
|
||||
return true;
|
||||
}
|
||||
public boolean addAll(Collection<? extends E> <warning descr="Parameter 'c' is never used">c</warning>) {
|
||||
public boolean addAll(Collection<? extends E> c) {
|
||||
boolean modified = false;
|
||||
return modified;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ interface B<BT> {
|
||||
|
||||
class Test {
|
||||
public static void test() {
|
||||
method1(Test::<error descr="Incompatible types: A<capture of ? super M> is not convertible to A<? super String>">method2</error>);
|
||||
method1<error descr="'method1(B<A<? super M>>)' in 'Test' cannot be applied to '(<method reference>)'">(Test::method2)</error>;
|
||||
}
|
||||
|
||||
static <M> void method1(B<A<? super M>> arg) { }
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
class Logger {}
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
User user = new User();
|
||||
Logger logger = null;
|
||||
|
||||
foo<error descr="'foo(T, java.util.logging.Logger, java.util.function.Function<T,java.lang.String>)' in 'Test' cannot be applied to '(User, Logger, <method reference>)'">(user, logger, User::getId)</error>;
|
||||
}
|
||||
|
||||
private static <T> void foo(T val, java.util.logging.Logger logger, java.util.function.Function<T, String> idFunction) { }
|
||||
}
|
||||
|
||||
class User {
|
||||
private String Id;
|
||||
|
||||
public String getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.Id = id;
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,11 @@ class Test {
|
||||
Test m(List<Integer> l1, List<Integer> l2);
|
||||
}
|
||||
|
||||
static Test meth(List<Integer>... <warning descr="Parameter 'lli' is never used">lli</warning>) {
|
||||
static Test meth(List<Integer>... lli) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Test(List<Integer>... <warning descr="Parameter 'lli' is never used">lli</warning>) {}
|
||||
Test(List<Integer>... lli) {}
|
||||
|
||||
{
|
||||
I <warning descr="Variable 'i1' is never used">i1</warning> = <warning descr="Unchecked generics array creation for varargs parameter">Test::meth</warning>;
|
||||
|
||||
@@ -31,8 +31,8 @@ class Test {
|
||||
String i1 = instanceCall(this::m0);
|
||||
String i2 = instanceCall(this::m1);
|
||||
String i3 = instanceCall(this::m2);
|
||||
String i4 = instanceCall<error descr="Ambiguous method call: both 'Test.instanceCall(I0)' and 'Test.instanceCall(I1<Object>)' match">(this::m01)</error>;
|
||||
String i5 = instanceCall<error descr="Ambiguous method call: both 'Test.instanceCall(I0)' and 'Test.instanceCall(I1<Object>)' match">(this::m012)</error>;
|
||||
String i4 = instanceCall(this::<error descr="Cannot resolve method 'm01'">m01</error>);
|
||||
String i5 = instanceCall(this::<error descr="Cannot resolve method 'm012'">m012</error>);
|
||||
}
|
||||
|
||||
void n0() { }
|
||||
@@ -53,7 +53,7 @@ class Test {
|
||||
Test s1 = staticCall(Test::n0);
|
||||
Test s2 = staticCall(Test::n1);
|
||||
Test s3 = staticCall<error descr="Cannot resolve method 'staticCall(<method reference>)'">(Test::n2)</error>;
|
||||
Test s4 = staticCall<error descr="Ambiguous method call: both 'Test.staticCall(I1<Object>)' and 'Test.staticCall(I2<Object, String>)' match">(Test::n01)</error>;
|
||||
Test s5 = staticCall<error descr="Ambiguous method call: both 'Test.staticCall(I1<Object>)' and 'Test.staticCall(I2<Object, String>)' match">(Test::n012)</error>;
|
||||
Test s4 = staticCall(Test::<error descr="Cannot resolve method 'n01'">n01</error>);
|
||||
Test s5 = staticCall(Test::<error descr="Cannot resolve method 'n012'">n012</error>);
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class Test {
|
||||
{
|
||||
Set<String> m = replyWith(this::query);
|
||||
System.out.println(m);
|
||||
Set<String> m1 = replyWith<error descr="Ambiguous method call: both 'Test.replyWith(Function<Object, List<Object>>)' and 'Test.replyWith(Callable<List<Object>>)' match">(this::query1)</error>;
|
||||
Set<String> m1 = replyWith(this::<error descr="Cannot resolve method 'query1'">query1</error>);
|
||||
System.out.println(m1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,6 @@ class Test {
|
||||
static void m(Test t, Object s) {}
|
||||
|
||||
static void test() {
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'Test.I'">I i = Test::m;</error>
|
||||
I i = Test::<error descr="Cannot resolve method 'm'">m</error>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class A {
|
||||
private void test5(Integer <warning descr="Parameter 'i' is never used">i</warning>, String... <warning descr="Parameter 'strings' is never used">strings</warning>) {}
|
||||
private void test5(Integer i, String... strings) {}
|
||||
private void <warning descr="Private method 'test5(java.lang.Integer, java.lang.Integer, java.lang.String...)' is never used">test5</warning>(Integer i, Integer b, String... strings) {
|
||||
System.out.println(i);
|
||||
System.out.println(b);
|
||||
|
||||
Reference in New Issue
Block a user