forked from JavaTX/JavaCompilerCore
jeweils apply eingefuegt, was nicht funktioniert
modified: ../../test/typeinference/UnifyTest.java Matrix auskommentiert und Lambda einkommentiert
This commit is contained in:
parent
2db5ecc260
commit
04d3ac84e7
@ -2,14 +2,15 @@ import java.lang.Integer;
|
||||
|
||||
class Faculty {
|
||||
|
||||
Integer mul(Integer x, Integer y) {
|
||||
return x;
|
||||
}
|
||||
|
||||
m () {
|
||||
|
||||
var fact = (Integer x) -> {
|
||||
return mul(x, x);
|
||||
if (x == 1) {
|
||||
return x;
|
||||
}
|
||||
else {
|
||||
return x * fact.apply(x-1);
|
||||
}
|
||||
};
|
||||
return fact;
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ public class Lambda {
|
||||
var lam1 = (Integer x) -> {
|
||||
return x;
|
||||
};
|
||||
return lam1;
|
||||
return lam1.apply(1);
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ public class Lambda {
|
||||
var lam1 = (x) -> {
|
||||
return x;
|
||||
};
|
||||
return lam1;
|
||||
return lam1.apply(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,12 +29,12 @@ public class UnifyTest {
|
||||
execute(new File(rootDirectory+"fc.jav"));
|
||||
}
|
||||
*/
|
||||
/*
|
||||
|
||||
@Test
|
||||
public void lambda() throws IOException, ClassNotFoundException {
|
||||
execute(new File(rootDirectory+"Lambda.jav"));
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
@Test
|
||||
public void lambda2() throws IOException, ClassNotFoundException {
|
||||
@ -74,6 +74,7 @@ public class UnifyTest {
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@Test
|
||||
public void matrix() throws IOException, ClassNotFoundException {
|
||||
@ -81,6 +82,7 @@ public class UnifyTest {
|
||||
//JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"Matrix.jav"));
|
||||
//compiler.generateBytecode();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user