val in java, including tests and javac resolution utilities.

This commit is contained in:
Reinier Zwitserloot committed 2010-11-03 00:42:58 +01:00
1 parent d9ba2a191a
commit f1cf083890
16 files changed
+941

No files matched your search

@@ -0,0 +1,20 @@
public class ValComplex {
private ValSimple field = new ValSimple();
private static final int CONSTANT = 20;
public void testReferencingOtherFiles() {
val shouldBeString = field.method();
val shouldBeInt = CONSTANT;
val lock = new Object();
synchronized (lock) {
val field = 20; //Shadowing
val inner = 10;
switch (field) {
case 5:
val shouldBeString2 = shouldBeString;
val innerInner = inner;
}
}
val shouldBeValSimple = field; //Unshadowing
}
}