mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Merge branch 'master' into upsource-master
Conflicts: platform/projectModel-impl/src/com/intellij/openapi/components/impl/BasePathMacroManager.java
This commit is contained in:
+82
@@ -1,16 +1,98 @@
|
||||
import java.io.*;
|
||||
|
||||
public class Main {
|
||||
static interface A
|
||||
{
|
||||
interface B { }
|
||||
}
|
||||
|
||||
static class D implements A
|
||||
{
|
||||
private interface B { }
|
||||
}
|
||||
|
||||
|
||||
static class C extends D implements A
|
||||
{
|
||||
interface E extends B { }
|
||||
interface E1 extends D.B { }
|
||||
interface E2 extends A.B { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Main1 {
|
||||
static interface A
|
||||
{
|
||||
interface B { }
|
||||
}
|
||||
|
||||
static class D implements A
|
||||
{
|
||||
interface B { }
|
||||
}
|
||||
|
||||
|
||||
static class C extends D implements A
|
||||
{
|
||||
interface E extends <error descr="Reference to 'B' is ambiguous, both 'Main1.D.B' and 'Main1.A.B' match">B</error> { }
|
||||
interface E1 extends D.B {
|
||||
}
|
||||
interface E2 extends A.B { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
interface A
|
||||
{
|
||||
interface B { }
|
||||
interface B1 { }
|
||||
}
|
||||
|
||||
class D implements A
|
||||
{
|
||||
private interface B { }
|
||||
interface B1 { }
|
||||
}
|
||||
|
||||
|
||||
class C extends D implements A
|
||||
{
|
||||
interface E extends B { }
|
||||
interface E1 extends D.<error descr="'D.B' has private access in 'D'">B</error> { }
|
||||
interface E2 extends A.B { }
|
||||
|
||||
interface F extends <error descr="Reference to 'B1' is ambiguous, both 'D.B1' and 'A.B1' match">B1</error> { }
|
||||
interface F1 extends D.B1 { }
|
||||
interface F2 extends A.B1 { }
|
||||
|
||||
}
|
||||
|
||||
|
||||
class AO {}
|
||||
class BAO {
|
||||
AO bar = new AO();
|
||||
{
|
||||
bar.foo();
|
||||
}
|
||||
private class AO {
|
||||
void foo(){}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class WithFileInputStream {
|
||||
private static final Runnable runn = new Runnable() {
|
||||
public void run() {
|
||||
new FileInputStream("path");
|
||||
}
|
||||
};
|
||||
|
||||
private static class FileInputStream {
|
||||
private FileInputStream(String str) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-5
@@ -26,15 +26,14 @@ class C {
|
||||
int parse(String s);
|
||||
}
|
||||
|
||||
interface ListProducer<T> {
|
||||
List<T> produce();
|
||||
}
|
||||
|
||||
void test() {
|
||||
Simplest simplest = <weak_warning descr="Lambda expressions type check is not yet implemented">() -> { }</weak_warning>;
|
||||
use(<weak_warning descr="Lambda expressions type check is not yet implemented">() -> { }</weak_warning>);
|
||||
|
||||
IntParser intParser = <weak_warning descr="Lambda expressions type check is not yet implemented">(String s) -> Integer.parseInt(s)</weak_warning>;
|
||||
ListProducer<String> listProducer = <weak_warning descr="Lambda expressions type check is not yet implemented"><T>() -> new ArrayList<T>()</weak_warning>;
|
||||
}
|
||||
|
||||
Runnable foo() {
|
||||
return <weak_warning descr="Lambda expressions type check is not yet implemented">() -> { System.out.println("foo"); }</weak_warning>;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Encapsulate field" "false"
|
||||
|
||||
class A {
|
||||
public final boolean m_bool;
|
||||
}
|
||||
|
||||
public class B {
|
||||
void method() {
|
||||
A a = new A();
|
||||
|
||||
a.m_bo<caret>ol = true;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Encapsulate field" "false"
|
||||
|
||||
class A {
|
||||
private boolean m_bool;
|
||||
}
|
||||
|
||||
public class B {
|
||||
void method() {
|
||||
A a = new A();
|
||||
|
||||
a.m_bo<caret>ol = true;
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Encapsulate field" "false"
|
||||
|
||||
class A {
|
||||
public final boolean m_bool;
|
||||
|
||||
void method() {
|
||||
m_bo<caret>ol = true;
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Encapsulate field" "false"
|
||||
|
||||
class A {
|
||||
public final boolean m_bool;
|
||||
|
||||
void method() {
|
||||
this.m_bo<caret>ol = true;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,18 @@
|
||||
PsiJavaFile:LambdaExpression12.java
|
||||
PsiLambdaExpression:<T>() -> new C<T>()
|
||||
PsiTypeParameterList
|
||||
PsiJavaToken:LT('<')
|
||||
PsiTypeParameter:T
|
||||
PsiIdentifier:T('T')
|
||||
PsiElement(EXTENDS_BOUND_LIST)
|
||||
<empty list>
|
||||
PsiJavaToken:GT('>')
|
||||
PsiParameterList:()
|
||||
PsiJavaToken:LPARENTH('(')
|
||||
PsiJavaToken:RPARENTH(')')
|
||||
PsiErrorElement:Unparsed tokens
|
||||
PsiJavaToken:LT('<')
|
||||
PsiIdentifier:T('T')
|
||||
PsiJavaToken:GT('>')
|
||||
PsiJavaToken:LPARENTH('(')
|
||||
PsiJavaToken:RPARENTH(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiJavaToken:ARROW('->')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiNewExpression:new C<T>()
|
||||
PsiKeyword:new('new')
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiJavaCodeReferenceElement:C<T>
|
||||
PsiIdentifier:C('C')
|
||||
PsiReferenceParameterList
|
||||
PsiJavaToken:LT('<')
|
||||
PsiTypeElement:T
|
||||
PsiJavaCodeReferenceElement:T
|
||||
PsiIdentifier:T('T')
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiJavaToken:GT('>')
|
||||
PsiExpressionList
|
||||
PsiJavaToken:LPARENTH('(')
|
||||
PsiJavaToken:RPARENTH(')')
|
||||
PsiKeyword:new('new')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiIdentifier:C('C')
|
||||
PsiJavaToken:LT('<')
|
||||
PsiIdentifier:T('T')
|
||||
PsiJavaToken:GT('>')
|
||||
PsiJavaToken:LPARENTH('(')
|
||||
PsiJavaToken:RPARENTH(')')
|
||||
@@ -1,21 +1,10 @@
|
||||
PsiJavaFile:LambdaExpression13.java
|
||||
PsiLambdaExpression:<T>t -> t
|
||||
PsiTypeParameterList
|
||||
PsiJavaToken:LT('<')
|
||||
PsiTypeParameter:T
|
||||
PsiIdentifier:T('T')
|
||||
PsiElement(EXTENDS_BOUND_LIST)
|
||||
<empty list>
|
||||
PsiJavaToken:GT('>')
|
||||
PsiParameterList:t
|
||||
PsiParameter:t
|
||||
PsiModifierList:
|
||||
<empty list>
|
||||
PsiIdentifier:t('t')
|
||||
PsiErrorElement:Unparsed tokens
|
||||
PsiJavaToken:LT('<')
|
||||
PsiIdentifier:T('T')
|
||||
PsiJavaToken:GT('>')
|
||||
PsiIdentifier:t('t')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiJavaToken:ARROW('->')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiReferenceExpression:t
|
||||
PsiReferenceParameterList
|
||||
<empty list>
|
||||
PsiIdentifier:t('t')
|
||||
PsiIdentifier:t('t')
|
||||
@@ -0,0 +1,14 @@
|
||||
public class Foo {
|
||||
public<T> void foo() {
|
||||
Predicate<T> predicate = ne<caret>w Predicate<T>() {
|
||||
@Override
|
||||
public boolean test(T t) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private interface Predicate<K> {
|
||||
boolean test(K t);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
public class Foo {
|
||||
public<T> void foo() {
|
||||
Predicate<T> predicate = new MyPredicate<>();
|
||||
}
|
||||
|
||||
private interface Predicate<K> {
|
||||
boolean test(K t);
|
||||
}
|
||||
|
||||
private static class MyPredicate<T> implements Predicate<T> {
|
||||
@Override
|
||||
public boolean test(T t) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
public class Foo {
|
||||
public<T> void foo() {
|
||||
Predicate<T> predicate = ne<caret>w Predicate<T>() {
|
||||
@Override
|
||||
public boolean test(T t) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private interface Predicate<K> {
|
||||
boolean test(K t);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
public class Foo {
|
||||
public<T> void foo() {
|
||||
Predicate<T> predicate = new MyPredicate<>();
|
||||
}
|
||||
|
||||
private interface Predicate<K> {
|
||||
boolean test(K t);
|
||||
}
|
||||
|
||||
private static class MyPredicate<T> implements Predicate<T> {
|
||||
@Override
|
||||
public boolean test(T t) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@ import java.util.*;
|
||||
|
||||
class A<K, V> {
|
||||
public Iterator<Map.Entry<K, V>> iterator(long revision) {
|
||||
return new MyIterator<K, V>();
|
||||
return new MyIterator<>();
|
||||
}
|
||||
|
||||
private static class MyIterator<K, V> implements Iterator<Map.Entry<K, V>> {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
class D {
|
||||
void f<caret>oo(Object o){}
|
||||
}
|
||||
|
||||
class DImpl extends D {
|
||||
void foo(Object o1) {
|
||||
super.foo(o1);
|
||||
int o = 0;
|
||||
System.out.println(o);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class D {
|
||||
void foo(Object o, boolean b){}
|
||||
}
|
||||
|
||||
class DImpl extends D {
|
||||
void foo(Object o1, boolean b) {
|
||||
super.foo(o1, b);
|
||||
int o = 0;
|
||||
System.out.println(o);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Base<T> {
|
||||
void m<caret>() {
|
||||
}
|
||||
}
|
||||
|
||||
class A extends Base<String> {
|
||||
void x() {
|
||||
m();
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
class Base<T> {
|
||||
void m(T clazz) {
|
||||
}
|
||||
}
|
||||
|
||||
class A extends Base<String> {
|
||||
void x(String clazz) {
|
||||
m(clazz);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
public class InlineThis {
|
||||
public InlineThis() {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(int i) {
|
||||
th<caret>is();
|
||||
}
|
||||
|
||||
public InlineThis(String str) {
|
||||
this(Integer.parseInt(str));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
InlineThis aInlineThis = new InlineThis();
|
||||
InlineThis aInlineThis1 = new InlineThis(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
public class InlineThis {
|
||||
public InlineThis() {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(int i) {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(String str) {
|
||||
this(Integer.parseInt(str));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
InlineThis aInlineThis = new InlineThis();
|
||||
InlineThis aInlineThis1 = new InlineThis(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
public class InlineThis {
|
||||
public InlineThis() {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(int i) {
|
||||
this();
|
||||
}
|
||||
|
||||
public InlineThis(String str) {
|
||||
th<caret>is(Integer.parseInt(str));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
InlineThis aInlineThis = new InlineThis();
|
||||
InlineThis aInlineThis1 = new InlineThis(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
public class InlineThis {
|
||||
public InlineThis() {
|
||||
System.out.println("code block here");
|
||||
}
|
||||
|
||||
public InlineThis(String str) {
|
||||
this();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
InlineThis aInlineThis = new InlineThis();
|
||||
InlineThis aInlineThis1 = new InlineThis();
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
public class TestCompletion {
|
||||
|
||||
public static <T, V> ParallelPipeline<T, V> test(T base, V newStage, T upstream, final ParallelPipeline<T, V> anObject) {
|
||||
if (base != null){
|
||||
return anObject;
|
||||
}
|
||||
else {
|
||||
return new ParallelPipeline<>(upstream, newStage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void f() {
|
||||
test(null, null, null, new ParallelPipeline<>(null, null));
|
||||
}
|
||||
private static class ParallelPipeline<T, V> {
|
||||
public ParallelPipeline(T p0, V p1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
public class TestCompletion {
|
||||
|
||||
public static <T, V> ParallelPipeline<T, V> test(T base, V newStage, T upstream) {
|
||||
if (base != null){
|
||||
return <selection>new ParallelPipeline<>(base, newStage)</selection>;
|
||||
}
|
||||
else {
|
||||
return new ParallelPipeline<>(upstream, newStage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void f() {
|
||||
test(null, null, null);
|
||||
}
|
||||
private static class ParallelPipeline<T, V> {
|
||||
public ParallelPipeline(T p0, V p1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Base implements I<String> {}
|
||||
class Te<caret>st extends Base implements I<String> {}
|
||||
interface I<T>{}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Base implements I<String> {}
|
||||
class Test extends Base {}
|
||||
interface I<T>{}
|
||||
Reference in New Issue
Block a user