-
-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(array): Allows array in an array. * fix(array): Builds dimensions with casts. * fix(executable): Allows block in executable. * fix(access): Qualified field access with import static. * fix(actual): Rewrite actual types with their enclosing class.
- Loading branch information
Showing
14 changed files
with
153 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package spoon.test.arrays.testclasses; | ||
|
||
import java.io.EOFException; | ||
|
||
public class Foo { | ||
public byte[] readByteArray(long byteCount) throws EOFException { | ||
byte[] result = new byte[(int) byteCount]; | ||
return result; | ||
} | ||
String[] s = new String[] { "--help" }; | ||
protected static final int grad4[][] = { | ||
{ 0, 1, 1, 1 }, { 0, 1, 1, -1 }, { 0, 1, -1, 1 }, { 0, 1, -1, -1 }, { 0, -1, 1, 1 }, { 0, -1, 1, -1 }, { 0, -1, -1, 1 }, { 0, -1, -1, -1 }, { 1, 0, 1, 1 }, { 1, 0, 1, -1 }, | ||
{ 1, 0, -1, 1 }, { 1, 0, -1, -1 }, { -1, 0, 1, 1 }, { -1, 0, 1, -1 }, { -1, 0, -1, 1 }, { -1, 0, -1, -1 }, { 1, 1, 0, 1 }, { 1, 1, 0, -1 }, { 1, -1, 0, 1 }, { 1, -1, 0, -1 }, | ||
{ -1, 1, 0, 1 }, { -1, 1, 0, -1 }, { -1, -1, 0, 1 }, { -1, -1, 0, -1 }, { 1, 1, 1, 0 }, { 1, 1, -1, 0 }, { 1, -1, 1, 0 }, { 1, -1, -1, 0 }, { -1, 1, 1, 0 }, { -1, 1, -1, 0 }, | ||
{ -1, -1, 1, 0 }, { -1, -1, -1, 0 } | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,12 @@ public void cook() { | |
public void run() { | ||
|
||
} | ||
|
||
void m() { | ||
int i; | ||
{ | ||
i = 0; | ||
} | ||
int x = 2 * i; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package spoon.test.imports.testclasses; | ||
|
||
import static spoon.test.imports.testclasses.internal4.Constants.*; | ||
|
||
public class Tacos { | ||
void m() { | ||
int i = CONSTANT.foo; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/test/java/spoon/test/imports/testclasses/internal4/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package spoon.test.imports.testclasses.internal4; | ||
|
||
public interface Constants { | ||
Foo CONSTANT = new Foo(); | ||
} |
5 changes: 5 additions & 0 deletions
5
src/test/java/spoon/test/imports/testclasses/internal4/Foo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package spoon.test.imports.testclasses.internal4; | ||
|
||
public class Foo { | ||
public int foo; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/test/java/spoon/test/reference/testclasses/Panini.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package spoon.test.reference.testclasses; | ||
|
||
import java.util.Iterator; | ||
import java.util.Map; | ||
|
||
public class Panini<K, V> { | ||
Iterator<Map.Entry<K, V>> entryIterator() { | ||
return new Itr<Map.Entry<K, V>>() { | ||
@Override | ||
Map.Entry<K, V> output(K key, V value) { | ||
return null; | ||
} | ||
}; | ||
} | ||
|
||
private abstract class Itr<T> implements Iterator<T> { | ||
@Override | ||
public T next() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean hasNext() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void remove() { | ||
|
||
} | ||
|
||
abstract T output(K key, V value); | ||
} | ||
} |