mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
class Test {
|
||||
|
||||
{
|
||||
pair<error descr="'pair(byte)' in 'Test' cannot be applied to '(int)'">(2)</error>;
|
||||
}
|
||||
|
||||
static <T> void pair( byte b) {}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
|
||||
interface X {
|
||||
void foo(int[] x);
|
||||
}
|
||||
|
||||
class C {
|
||||
static void main(String[] args){
|
||||
X a = (int x[]) -> { };
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
import java.util.*;
|
||||
|
||||
class X<A extends Comparable<A>, B extends Comparable<B>> {
|
||||
|
||||
class Pair implements Comparable<Pair> {
|
||||
A a;
|
||||
B b;
|
||||
|
||||
|
||||
public A getA() {
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
public B getB() {
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int compareTo(Pair other) {
|
||||
Comparator<Pair> comparator = Comparator.comparing(Pair::getA).thenComparing(Pair::getB);
|
||||
|
||||
return comparator.compare(this, other);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Try to generify 'before2.java'" "true"
|
||||
import java.util.ArrayList;
|
||||
class Use {
|
||||
void f() {
|
||||
ArrayList<String> s = new ArrayLi<caret>st();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user