Merge branch 'bigRefactoring' into unify-Test
This commit is contained in:
commit
15f5a2dc76
@ -114,7 +114,9 @@ public class TypeGenerator {
|
||||
if(referenceTypeContext.classOrInterfaceType() != null){
|
||||
if(referenceTypeContext.classOrInterfaceType().classType_lfno_classOrInterfaceType()!= null){
|
||||
Java8Parser.ClassType_lfno_classOrInterfaceTypeContext ctx = referenceTypeContext.classOrInterfaceType().classType_lfno_classOrInterfaceType();
|
||||
return convertTypeName(ctx.Identifier().toString(), ctx.typeArguments(),referenceTypeContext.getStart(), reg, generics);
|
||||
//return convertTypeName(ctx.Identifier().toString(), ctx.typeArguments(),referenceTypeContext.getStart(), reg, generics);
|
||||
if(ctx.typeArguments() != null)throw new NotImplementedException();
|
||||
return convertTypeName(referenceTypeContext.getText(), null,referenceTypeContext.getStart(), reg, generics);
|
||||
}else{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
@ -98,9 +98,10 @@ public final class TypeParams implements Iterable<UnifyType>{
|
||||
*/
|
||||
public boolean occurs(PlaceholderType t) {
|
||||
for(UnifyType p : typeParams)
|
||||
if(p instanceof PlaceholderType) {
|
||||
if(p instanceof PlaceholderType) {//PL 2018-01-31 dangeling else Problem { ... } eingefuegt.
|
||||
if(p.equals(t))
|
||||
return true; }
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
if(p.getTypeParams().occurs(t))
|
||||
return true; }
|
||||
|
@ -6,10 +6,14 @@ class Faculty {
|
||||
return x;
|
||||
}
|
||||
|
||||
m () {
|
||||
Fun1<java.lang.Integer,java.lang.Integer> m () {
|
||||
var fact = (Integer x) -> {
|
||||
return mul(x, fact.apply(x));
|
||||
};
|
||||
return fact;
|
||||
}
|
||||
}
|
||||
|
||||
interface Fun1<A,B>{
|
||||
B apply(A a);
|
||||
}
|
Loading…
Reference in New Issue
Block a user