mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
moved java resolve tests to community
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class A extends A.<ref>Foo, B{
|
||||
}
|
||||
|
||||
interface B{
|
||||
static class Foo{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A extends B.<ref>Foo implements B{
|
||||
}
|
||||
|
||||
interface B{
|
||||
static class Foo{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
public class TTT implements <ref>Bar{
|
||||
static interface Bar{}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Test{
|
||||
void foo() throws java.io.<ref>IOException{}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
|
||||
public class ImpmortConflict1{
|
||||
public static void main(String[] args){
|
||||
<ref>Date d = new Date();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import java.sql.*;
|
||||
import java.util.Date;
|
||||
|
||||
public class ImportConflict2{
|
||||
public static void main(String[] args){
|
||||
<ref>Date d = new Date();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class C{
|
||||
void foo(){
|
||||
class A{
|
||||
<ref>B b = null;
|
||||
private class B{};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A{
|
||||
{
|
||||
class B{}
|
||||
|
||||
new <ref>B();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A{
|
||||
{
|
||||
class B{
|
||||
<ref>B b;
|
||||
}
|
||||
|
||||
new B();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
private static class B{}
|
||||
}
|
||||
|
||||
class C extends A.<ref>B{}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A {
|
||||
{
|
||||
Outer outer;
|
||||
outer.new <ref>Inner();
|
||||
}
|
||||
}
|
||||
|
||||
class Outer{
|
||||
class Inner{}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A {
|
||||
{
|
||||
Outer outer;
|
||||
outer.new <ref>Inner(){};
|
||||
}
|
||||
}
|
||||
|
||||
class Outer{
|
||||
class Inner{}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class C<T> {}
|
||||
class CC extends C<<ref>Inner> {
|
||||
static class Inner { }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
interface A {
|
||||
class Entry {}
|
||||
}
|
||||
|
||||
class B implements A {
|
||||
private class Entry {}
|
||||
}
|
||||
|
||||
|
||||
class C extends B {
|
||||
static void foo(<ref>Entry e){
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import static Outer.Double;
|
||||
|
||||
class Outer {
|
||||
static class Double {
|
||||
}
|
||||
}
|
||||
|
||||
class StaticImportTest {
|
||||
public static void main(String[] args) {
|
||||
<ref>Double d;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class TwoModules {
|
||||
|
||||
<ref>Src src;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class TwoModules2 {
|
||||
|
||||
<ref>Test test;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class s {
|
||||
public static final repeat REPEAT = new <ref>repeat();
|
||||
boolean repeat = false;
|
||||
static class repeat {}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class s {
|
||||
public static final repeat REPEAT = new <ref>repeat(){};
|
||||
boolean repeat = false;
|
||||
static class repeat {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
class Src {}
|
||||
@@ -0,0 +1 @@
|
||||
class Test {}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Test {
|
||||
public void foo() {
|
||||
int i = 0;
|
||||
System.out.println(<ref>i);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
String s = "/x/y/MyClass.java<caret>";
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
String s = "x/<caret>MyFile.txt";
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
xxxxxxxxxxxxx
|
||||
@@ -0,0 +1 @@
|
||||
//xxxxxxxxx
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
class Test {
|
||||
private static void p( Class<? extends Object> cl )
|
||||
{
|
||||
cl.<ref>getSuperclass();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class C {
|
||||
<V> V m(V v) {
|
||||
return null;
|
||||
}
|
||||
|
||||
void n () {
|
||||
<ref>m(10);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
public class Seq<T> {
|
||||
public Seq() {}
|
||||
|
||||
public Seq(T x, Seq<T> xs) {
|
||||
}
|
||||
|
||||
static <T> Seq<T> nil () {
|
||||
return new Seq<T> ();
|
||||
}
|
||||
|
||||
static <V> Seq<V> cons (V x, Seq<V> xs) {
|
||||
return new Seq<V> (x, xs);
|
||||
}
|
||||
|
||||
static void foo() {
|
||||
Seq<String> n = <ref>nil();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
public class Seq<T> {
|
||||
public Seq() {}
|
||||
|
||||
public Seq(T x, Seq<T> xs) {
|
||||
}
|
||||
|
||||
static <T> Seq<T> nil () {
|
||||
return new Seq<T> ();
|
||||
}
|
||||
|
||||
static <V> Seq<V> cons (V x, Seq<V> xs) {
|
||||
return new Seq<V> (x, xs);
|
||||
}
|
||||
|
||||
static void foo() {
|
||||
Seq<String> s = <ref>cons("abc", nil());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
public class Seq<T> {
|
||||
public Seq() {}
|
||||
|
||||
public Seq(T x, Seq<T> xs) {
|
||||
}
|
||||
|
||||
static <T> Seq<T> nil () {
|
||||
return new Seq<T> ();
|
||||
}
|
||||
|
||||
static <V> Seq<V> cons (V x, Seq<V> xs) {
|
||||
return new Seq<V> (x, xs);
|
||||
}
|
||||
|
||||
static void foo (Seq<String> seq) {}
|
||||
|
||||
static void foo() {
|
||||
foo(<ref>nil());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
public class Seq<T> {
|
||||
public Seq() {}
|
||||
|
||||
public Seq(T x, Seq<T> xs) {
|
||||
}
|
||||
|
||||
static <T> Seq<T> nil () {
|
||||
return new Seq<T> ();
|
||||
}
|
||||
|
||||
static <V> Seq<V> cons (V x, Seq<V> xs) {
|
||||
return new Seq<V> (x, xs);
|
||||
}
|
||||
|
||||
static void foo() {
|
||||
(Seq<String>)<ref>nil();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class C {
|
||||
class I {}
|
||||
class A extends I {}
|
||||
class B extends I {}
|
||||
|
||||
<T> T f(T t1, T t2) {return null;}
|
||||
|
||||
void foo () {
|
||||
Object o = <ref>f (new A(), new B ());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class C <T> {
|
||||
<T> T foo () {return null;}
|
||||
|
||||
class Sub {
|
||||
T foo () {
|
||||
return C.this.<ref>foo();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A<T> {}
|
||||
class B<T> extends A<T> {}
|
||||
|
||||
class C {
|
||||
<T> B<T> f() {return null;}
|
||||
|
||||
void bar () {
|
||||
A<String> a = <ref>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import java.util.*;
|
||||
|
||||
|
||||
class SortedList<E extends Comparable> extends ArrayList<E>
|
||||
{
|
||||
public static <T> T binarySearch(List<? extends Comparable<? super T>> list, T key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean add(E e){
|
||||
<ref>binarySearch(this,e); //infer E
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> T extract(List<T> l) {
|
||||
return null;
|
||||
}
|
||||
|
||||
void foo (List<double[]> l) {
|
||||
<ref>extract(l);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class G<T> {}
|
||||
|
||||
public class C {
|
||||
|
||||
<T> T f (G<T> l) { return null;}
|
||||
|
||||
void foo (G l) {
|
||||
String s = <ref>f(l);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class List<T> {}
|
||||
class ArrayList<T> extends List<T> {}
|
||||
class Comparator<T> {}
|
||||
|
||||
public class TokenStreamRewriteEngine {
|
||||
public static <T> T binarySearch(List<? extends T> list, T key, Comparator<? super T> c) {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void addToSortedRewriteList(String programName, String op, Comparator comparator) {
|
||||
List rewrites = new ArrayList();
|
||||
<ref>binarySearch(rewrites, op, comparator);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class C {
|
||||
class Inner {}
|
||||
<T extends Inner> T f() {return null;}
|
||||
|
||||
void bar () {
|
||||
Object o = <ref>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
<T extends String> int getValue() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
void cc() {
|
||||
<ref>getValue();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class C1 {}
|
||||
class C2 extends C1 {}
|
||||
|
||||
class C {
|
||||
<T> T foo (T... ts) { return null; }
|
||||
|
||||
void bar () {
|
||||
<ref>foo(new C2());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class C1 {}
|
||||
class C2 extends C1 {}
|
||||
|
||||
class C {
|
||||
<T> T foo (T... ts) { return null; }
|
||||
|
||||
void bar () {
|
||||
<ref>foo(new C2(), new C1());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> List<T> asList(T... ts) {
|
||||
return null;
|
||||
}
|
||||
void foo () {
|
||||
<ref>asList(new int[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> List<T> asList(T... ts) {
|
||||
return null;
|
||||
}
|
||||
void foo () {
|
||||
<ref>asList(new int[0], new int[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> List<T> asList(T... ts) {
|
||||
return null;
|
||||
}
|
||||
void foo () {
|
||||
<ref>asList(new Integer[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> List<T> asList(T... ts) {
|
||||
return null;
|
||||
}
|
||||
void foo () {
|
||||
<ref>asList(new Integer[0], new Integer[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class Collection<T> {}
|
||||
class Comparator<T> {}
|
||||
|
||||
public class Collections {
|
||||
public static <T> T min(Collection<? extends T> coll, Comparator<? super T> comp) {
|
||||
if (comp==null)
|
||||
return (T)<ref>min((Collection<SelfComparable>) (Collection) coll);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends Object & Comparable<? super T>> T min(Collection<? extends T> coll) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private interface SelfComparable extends Comparable<SelfComparable> {}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class C<T> {
|
||||
<T> T foo (C<? extends T> c) {return null;}
|
||||
|
||||
void bar (C<? extends String> c) {
|
||||
<ref>foo(c);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
class Collection<T> {}
|
||||
|
||||
interface Bar {}
|
||||
|
||||
class BarImpl implements Bar {}
|
||||
|
||||
interface Foo<E extends Bar> {
|
||||
Collection<E> getElements();
|
||||
}
|
||||
|
||||
class FooImpl implements Foo<BarImpl> {
|
||||
public Collection<BarImpl> getElements() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class Bazz {
|
||||
public static <E extends Bar> Collection<E> getElements(Collection<? extends Foo<E>> foos) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void failure(final Collection<FooImpl> foos) {
|
||||
<ref>getElements(foos);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class X {
|
||||
static class Y<T> {
|
||||
}
|
||||
|
||||
static <T> Y<T> x(Y<? super T> y) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
Y<Long> y1 = null;
|
||||
X.<ref>x(y1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class X {
|
||||
static class Y<T> {
|
||||
}
|
||||
|
||||
static <T> Y<T> x(Y<? super T[]> y) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
Y<Long[]> y1 = null;
|
||||
X.<ref>x(y1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class X {
|
||||
static class Y<T> {
|
||||
}
|
||||
|
||||
static <T> Y<T> x(Y<? super Y<T>> y) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
Y<Y<Long>> y1 = null;
|
||||
X.<ref>x(y1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class List<T>{
|
||||
T get () {return null;}
|
||||
}
|
||||
|
||||
class CaptureTest <T> {
|
||||
private List<? extends List<T>> listOfSets;
|
||||
|
||||
private void foo() {
|
||||
<ref>doGenericThing(listOfSets.get(0));
|
||||
}
|
||||
|
||||
public <U> List<U> doGenericThing(List<U> set) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 22.01.2003
|
||||
* Time: 11:15:19
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Test1 {
|
||||
public static class A{
|
||||
protected void foo(){}
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
new A(){
|
||||
protected void foo(){
|
||||
super.<ref>foo();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Array{
|
||||
void foo(){
|
||||
int[] array;
|
||||
array.<ref>clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 22.01.2003
|
||||
* Time: 14:46:09
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Bug7968 {
|
||||
public static void foo (String s, String s1, String s2, Object[] oa)
|
||||
{
|
||||
Bar.<ref>bar (s, s1, s2, oa);
|
||||
}
|
||||
class Bar
|
||||
{
|
||||
public static void bar (Object o, String s1, String s2, Object[] ao) {}
|
||||
public static void bar (String s, String s1, String s2, Object o) {}
|
||||
public static void bar (String s, String s1, String s2, Object[] ao) {}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class Z{
|
||||
public interface A { Object clone(); }
|
||||
|
||||
interface B extends A { }
|
||||
|
||||
|
||||
|
||||
|
||||
class C implements B {
|
||||
Object clone() {
|
||||
C c = new C();
|
||||
((A) c).clone();
|
||||
((B) c).<ref>clone();
|
||||
return c.clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
public class Cycle1{
|
||||
public interface A{
|
||||
void foo();
|
||||
}
|
||||
|
||||
public interface B{
|
||||
void foo();
|
||||
}
|
||||
|
||||
public static class C
|
||||
implements A{
|
||||
void foo(){}
|
||||
}
|
||||
|
||||
public static class D extends C
|
||||
implements B{
|
||||
void foo(int ggg){}
|
||||
|
||||
void foo1(){
|
||||
<ref>foo();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
A(){
|
||||
<ref>super();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
abstract public class YYY implements I,II{
|
||||
private void f(YYY y) {
|
||||
II i = y.<ref>foo();
|
||||
}
|
||||
}
|
||||
interface I {
|
||||
I foo();
|
||||
}
|
||||
interface II extends I {
|
||||
II foo();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
"aaa".<ref>indexOf('a');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 23.01.2003
|
||||
* Time: 18:44:34
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Inner1 {
|
||||
private int a(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
private class A extends B{
|
||||
{
|
||||
int j = <ref>a();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
public int a(){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class A{
|
||||
public int askdh(){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A{
|
||||
public void askdh(){
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
class Super1 extends B{
|
||||
{
|
||||
super.<ref>askdh();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
public class InnerClass {
|
||||
void foo() {}
|
||||
|
||||
class Inner {
|
||||
void foo(int i) {}
|
||||
|
||||
void bar() {
|
||||
<ref>foo();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class A{
|
||||
interface A{}
|
||||
interface B{}
|
||||
|
||||
class C implements A, B{
|
||||
void foo(A a){}
|
||||
void foo(B b){}
|
||||
}
|
||||
{
|
||||
new C().<ref>foo(new C())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test{
|
||||
{
|
||||
new Runnable(){
|
||||
{
|
||||
<ref>run();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class A{
|
||||
void foo(Object a, String b){
|
||||
}
|
||||
|
||||
void foo(){
|
||||
<ref>foo("aaa", true);
|
||||
}
|
||||
|
||||
void foo(String a, boolean b){
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class A {
|
||||
B b1;
|
||||
static B b2;
|
||||
public class Z extends B{
|
||||
public void akshdkjasdh(){}
|
||||
}
|
||||
private class B{
|
||||
public void f() {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class C extends A {
|
||||
{
|
||||
b1.<ref>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import java.io.Serializable;
|
||||
|
||||
interface PublicCloneable {
|
||||
Object clone();
|
||||
}
|
||||
interface Extension extends Serializable, PublicCloneable {}
|
||||
class Test {
|
||||
void foo(Extension bar) {
|
||||
bar.<ref>clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class A{
|
||||
public abstract class IntegerPredicateBase implements Predicate{
|
||||
public boolean applies(Object obj){
|
||||
return <ref>applies((Integer)obj);
|
||||
}
|
||||
}
|
||||
public interface Predicate{
|
||||
boolean applies(Object obj);
|
||||
boolean applies(Integer myObj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class A{
|
||||
private void foo(String s){}
|
||||
public void foo(Object o){}
|
||||
}
|
||||
|
||||
class B{
|
||||
{
|
||||
new A().<ref>foo("a");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Outer {
|
||||
private void foo() {}
|
||||
|
||||
static class Inner extends Outer {
|
||||
void bar() {
|
||||
<ref>foo();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Outer {
|
||||
private void foo() {}
|
||||
|
||||
class Inner extends Outer {
|
||||
void bar() {
|
||||
<ref>foo();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
class Xc extends JComponent {
|
||||
JComponent component;
|
||||
|
||||
protected void paintComponent(final Graphics g) {
|
||||
component.<ref>paintComponent(g);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
public class Remove1{
|
||||
void foo(Object o){}
|
||||
void foo(String o){}
|
||||
public static class A extends Remove{
|
||||
void foo(Object o){
|
||||
}
|
||||
void foo(String o){
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(){
|
||||
new A().<ref>foo("aaa");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import java.util.ArrayList;
|
||||
public class Remove2{
|
||||
private static ArrayList lst = new ArrayList();
|
||||
public static void main(){
|
||||
lst.<ref>remove("aaa");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package psi.resolve.method;
|
||||
|
||||
import com.intellij.util.containers.trove.THashMap;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 17.01.2003
|
||||
* Time: 15:08:26
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Remove3{
|
||||
THashMap map = new THashMap();
|
||||
|
||||
void foo(){
|
||||
map.<ref>size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package ;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 17.01.2003
|
||||
* Time: 19:11:56
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Remove4 {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
interface I {
|
||||
boolean foo(Object obj);
|
||||
|
||||
boolean foo(Integer myObj);
|
||||
}
|
||||
|
||||
abstract class C implements I {
|
||||
public boolean foo(Object obj) {
|
||||
return <ref>foo((Integer)obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
class Base {
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
}
|
||||
|
||||
class Server {
|
||||
static Base sub(Base p1, Base p2) {
|
||||
}
|
||||
|
||||
static Derived sub(Derived p1, Base p2) {
|
||||
}
|
||||
|
||||
static Derived sub(Base p1, Derived p2) {
|
||||
}
|
||||
|
||||
static Derived sub(Derived p1, Derived p2) {
|
||||
}
|
||||
}
|
||||
|
||||
class Client {
|
||||
{
|
||||
Derived arg = null;
|
||||
Server.<ref>sub(arg, arg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class A{
|
||||
String toHex(int i) {}
|
||||
String toHex(short i) {}
|
||||
|
||||
void f(){
|
||||
<ref>toHex('i');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class Simple {
|
||||
public void method(String s) {
|
||||
}
|
||||
|
||||
static {
|
||||
Simple a = new Simple();
|
||||
a.<ref>method("blah");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Sout {
|
||||
static {
|
||||
System.out.<ref>println();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
public class Foo {
|
||||
public void foo() {}
|
||||
|
||||
public static void foo(char c){}
|
||||
}
|
||||
|
||||
class A{
|
||||
{
|
||||
Foo.<ref>foo();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A{
|
||||
public void askdh(){
|
||||
}
|
||||
}
|
||||
|
||||
class Super1 extends A{
|
||||
{
|
||||
super.<ref>askdh();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
interface I {
|
||||
Object clone();
|
||||
}
|
||||
|
||||
interface J extends I {
|
||||
}
|
||||
|
||||
class CBase implements I {
|
||||
}
|
||||
|
||||
class C extends CBase implements J {
|
||||
{
|
||||
super.<ref>clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 28.05.2003
|
||||
* Time: 16:24:03
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class TestOverloading1 {
|
||||
class A{
|
||||
void foo(){}
|
||||
}
|
||||
class B extends A{
|
||||
void foo(){}
|
||||
}
|
||||
|
||||
{
|
||||
new B().<ref>foo(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
void foo() throws Exception{
|
||||
throw <ref>Exception();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
void foo() throws Exception{
|
||||
throw <ref>Exception();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
void foo(){
|
||||
String.<ref>valueOf(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class Ambiguous {
|
||||
void f(Object o1, Object o2) {}
|
||||
void f(int o1, int o2) {}
|
||||
|
||||
void g(Integer i)
|
||||
{
|
||||
<ref>f(1, i);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
public class Foo {
|
||||
|
||||
public void foo(Comparable c) {
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
<ref>foo(1L);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Foo {
|
||||
<T> Foo(T t) {
|
||||
|
||||
}
|
||||
|
||||
static {
|
||||
Foo f = <String>new <ref>Foo();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
interface F {
|
||||
Object o();
|
||||
}
|
||||
interface E extends F {
|
||||
String o();
|
||||
}
|
||||
interface B extends E,F { }
|
||||
|
||||
class User {
|
||||
void x(B a) {
|
||||
String o = a.<ref>o();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class X<T> {
|
||||
class XX extends X<X> {}
|
||||
void <T> f(X<T> x, T t) {
|
||||
f(new XX(), new X());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
interface Runnable{}
|
||||
interface Class<T>{}
|
||||
|
||||
public class Foo implements Runnable{
|
||||
static <T> void foo(Class<T> aClass, T t) { }
|
||||
|
||||
Class<Foo> getC(){ return new Class<Foo>(){};}
|
||||
public void run() {
|
||||
}
|
||||
|
||||
{
|
||||
<ref>foo(new Class<Runnable>(){}, this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
<T> T f() {
|
||||
}
|
||||
|
||||
{
|
||||
this.<String><ref>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
<T> Foo<T> f() {
|
||||
}
|
||||
|
||||
static {
|
||||
new Foo().<Integer><ref>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
class Test{
|
||||
interface Map<K, V>{
|
||||
K put(K k, V v);
|
||||
}
|
||||
|
||||
class HashMap implements Map<Integer, Integer>{
|
||||
}
|
||||
|
||||
{
|
||||
HashMap map = new HashMap();
|
||||
map.put(new Integer(1), new Integer(1)).<ref>byteValue();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user