"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/test/groovy/bugs/Groovy8947.groovy" between
apache-groovy-src-3.0.8.zip and apache-groovy-src-3.0.9.zip

About: Groovy is an agile dynamic (scripting) language for the Java Platform. It has features similar to those of Python, Ruby, Perl, and Smalltalk. Source release.

Groovy8947.groovy  (apache-groovy-src-3.0.8):Groovy8947.groovy  (apache-groovy-src-3.0.9)
skipping to change at line 48 skipping to change at line 48
} }
} }
public static newCpuInstance(int coreNumber) { public static newCpuInstance(int coreNumber) {
return new Computer().new Cpu(coreNumber) return new Computer().new Cpu(coreNumber)
} }
} }
assert 4 == new Computer().new Cpu(4).coreNumber assert 4 == new Computer().new Cpu(4).coreNumber
assert 4 == Computer.newCpuInstance(4).coreNumber assert 4 == Computer.newCpuInstance(4).coreNumber
assert 0 == new HashSet(new ArrayList()).size() assert 0 == new HashSet(new ArrayList()).size()
def coreNumber = new Computer().new Cpu(4).coreNumber
assert 4 == coreNumber
def cpu = new Computer().new Cpu(4)
assert 4 == cpu.coreNumber
''' '''
} }
@Test @Test
void testResolvingNonStaticInnerClass2() { void testResolvingNonStaticInnerClass2() {
assertScript ''' assertScript '''
public class Computer { public class Computer {
public class Cpu { public class Cpu {
int coreNumber int coreNumber
public Cpu(int coreNumber) { public Cpu(int coreNumber) {
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)