added some tests
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
f3e3158460
commit
36e56fa66e
@ -0,0 +1,13 @@
|
||||
// @expected: TypeMismatchException
|
||||
public class Test{
|
||||
|
||||
public void test(boolean b){
|
||||
if(b == 2){
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
public class Test{
|
||||
|
||||
public Car c;
|
||||
|
||||
public int test(){
|
||||
return c.getSpeed();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class Car{
|
||||
|
||||
private int speed;
|
||||
|
||||
public int getSpeed(){
|
||||
return speed;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
public class Test{
|
||||
|
||||
public void test(boolean b){
|
||||
if(b == true){
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
25
src/test/resources/input/typedAstFeaturesTests/FullTest.java
Normal file
25
src/test/resources/input/typedAstFeaturesTests/FullTest.java
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
public class Test {
|
||||
|
||||
public Car c;
|
||||
|
||||
public int test(boolean b, int x) {
|
||||
if (b == true) {
|
||||
return c.getSpeed();
|
||||
} else {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class Car {
|
||||
|
||||
private int speed;
|
||||
|
||||
public int getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user