mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
more java tests moved to community
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// "Cast parameter to 'a'" "true"
|
||||
class x {}
|
||||
class a extends x {
|
||||
a(a a) {}
|
||||
a(x x) {}
|
||||
|
||||
void f(Runnable r) {
|
||||
new a(<caret>(a) r);
|
||||
}
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Cast parameter to 'x'" "true"
|
||||
class x {}
|
||||
class a extends x {
|
||||
a(a a) {}
|
||||
a(x x) {}
|
||||
|
||||
void f(Runnable r) {
|
||||
new a(<caret>(x) r);
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Cast 1st parameter to 'double'" "true"
|
||||
class x {}
|
||||
class a extends x {
|
||||
a(a a) {}
|
||||
a(x x) {}
|
||||
a(int i, double d) {}
|
||||
a(double d, int i) {}
|
||||
|
||||
void f(Runnable r) {
|
||||
new a(<caret>(double) 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Cast 2nd parameter to 'double'" "true"
|
||||
class x {}
|
||||
class a extends x {
|
||||
a(a a) {}
|
||||
a(x x) {}
|
||||
a(int i, double d) {}
|
||||
a(double d, int i) {}
|
||||
|
||||
void f(Runnable r) {
|
||||
new a(<caret>1, (double) 1);
|
||||
}
|
||||
}
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// "Cast parameter to 'GeneralTest.B'" "true"
|
||||
import java.util.*;
|
||||
class GeneralTest {
|
||||
static class B {
|
||||
|
||||
}
|
||||
static class A {
|
||||
A(B b) {
|
||||
System.out.println(b);
|
||||
}
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
List a = new ArrayList();
|
||||
new A((B) a.get(0))<caret> {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Cast parameter to 'a'" "true"
|
||||
class x {}
|
||||
class a extends x {
|
||||
a(a a) {}
|
||||
a(x x) {}
|
||||
|
||||
void f(Runnable r) {
|
||||
new a(<caret>r);
|
||||
}
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Cast parameter to 'x'" "true"
|
||||
class x {}
|
||||
class a extends x {
|
||||
a(a a) {}
|
||||
a(x x) {}
|
||||
|
||||
void f(Runnable r) {
|
||||
new a(<caret>r);
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Cast 1st parameter to 'double'" "true"
|
||||
class x {}
|
||||
class a extends x {
|
||||
a(a a) {}
|
||||
a(x x) {}
|
||||
a(int i, double d) {}
|
||||
a(double d, int i) {}
|
||||
|
||||
void f(Runnable r) {
|
||||
new a(<caret>1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Cast 2nd parameter to 'double'" "true"
|
||||
class x {}
|
||||
class a extends x {
|
||||
a(a a) {}
|
||||
a(x x) {}
|
||||
a(int i, double d) {}
|
||||
a(double d, int i) {}
|
||||
|
||||
void f(Runnable r) {
|
||||
new a(<caret>1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// "Cast parameter to 'GeneralTest.B'" "true"
|
||||
import java.util.*;
|
||||
class GeneralTest {
|
||||
static class B {
|
||||
|
||||
}
|
||||
static class A {
|
||||
A(B b) {
|
||||
System.out.println(b);
|
||||
}
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
List a = new ArrayList();
|
||||
new A(a.get(0))<caret> {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user