forked from JavaTX/JavaCompilerCore
modified: src/de/dhbwstuttgart/syntaxtree/factory/UnifyTypeFactory.java
FunN-Types werden nach RefTypes mit FunN$$ nach Unifikation zurueckkonvertiert. modified: target/JavaTXcompiler-0.1-jar-with-dependencies.jar modified: test/bytecode/javFiles/Faculty.jav modified: test/bytecode/javFiles/Lambda.jav modified: test/bytecode/javFiles/OL.jav modified: test/javFiles/Lambda.jav
This commit is contained in:
parent
b5bc9fa01a
commit
1991bbbcd3
@ -208,7 +208,7 @@ public class UnifyTypeFactory {
|
||||
}
|
||||
|
||||
public static RefTypeOrTPHOrWildcardOrGeneric convert(FunNType t, Map<String,TypePlaceholder> tphs) {
|
||||
RefType ret = new RefType(new JavaClassName(t.getName()), convert(t.getTypeParams(), tphs), new NullToken());
|
||||
RefType ret = new RefType(new JavaClassName(t.getName()+"$$"), convert(t.getTypeParams(), tphs), new NullToken());
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Binary file not shown.
@ -5,12 +5,12 @@ class Faculty {
|
||||
m () {
|
||||
|
||||
var fact = (Integer x) -> {
|
||||
if (x == 1) {
|
||||
//if (x == 1) {
|
||||
return x;
|
||||
}
|
||||
else {
|
||||
return x * fact.apply(x-1);
|
||||
}
|
||||
//}
|
||||
//else {
|
||||
//return x * (fact.apply(x-1));
|
||||
//}
|
||||
};
|
||||
return fact;
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ public class Lambda {
|
||||
var lam1 = (Integer x) -> {
|
||||
return x;
|
||||
};
|
||||
return lam1.apply(1);
|
||||
return lam1;
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ class OL {
|
||||
|
||||
class OLMain {
|
||||
|
||||
java.lang.Integer main(x) {
|
||||
main(x) {
|
||||
var ol;
|
||||
ol = new OL();
|
||||
return ol.m(x);
|
||||
|
@ -4,7 +4,7 @@ import java.lang.Number;
|
||||
public class Lambda {
|
||||
|
||||
m () {
|
||||
var lam1 = (x) -> {
|
||||
var lam1 = (Integer x) -> {
|
||||
return x;
|
||||
};
|
||||
return lam1.apply(1);
|
||||
|
Loading…
Reference in New Issue
Block a user