Merge branch 'bytecode2' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into bytecode2

Conflicts:
	test/bytecode/javFiles/Lambda.jav
This commit is contained in:
Martin Plümicke 2018-08-09 15:34:57 +02:00
commit 6bdd347298
6 changed files with 10 additions and 19 deletions

View File

@ -119,7 +119,7 @@ public class Signature {
if(!ret.equals("V")) {
// TODO TypeToSignature nochmal kontrollieren und schauen ob man dort wirklich
// T... braucht und L ...
if(ret.contains("$") && !ret.contains("$$")) {
if(ret.contains("$") && !ret.contains("$$") && !ret.contains("<")) {
if(genericsAndBounds.containsKey(ret)) {
genericsAndBoundsMethod.put(ret.substring(1), genericsAndBounds.get(ret.substring(1)));
}else {
@ -233,6 +233,7 @@ public class Signature {
if(p instanceof WildcardType) {
if(((WildcardType) p).getInnerType() instanceof GenericRefType) {
String name = new TypeToSignature().visit((GenericRefType)((WildcardType) p).getInnerType());
System.out.println("NAME WC = " + name);
if(!genericsAndBoundsMethod.containsKey(name) && !genericsAndBounds.containsKey(name)) {
sw.visitFormalTypeParameter(name);
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));

View File

@ -34,7 +34,7 @@ public class TypeToSignature implements TypeVisitor<String> {
// params += "L"+param.toString().replace(".", "/");
// }
params += param.acceptTV(new TypeToSignature());
if(param instanceof TypePlaceholder)
if(!(param instanceof RefType))
params += ";";
// if(it.hasNext())params += ";";
}

View File

@ -42,7 +42,7 @@ public class GenericsResolverSameName implements GenericsResolver, TypeVisitor<R
@Override
public RefTypeOrTPHOrWildcardOrGeneric visit(ExtendsWildcardType extendsWildcardType) {
return new SuperWildcardType(extendsWildcardType.getInnerType().acceptTV(this), extendsWildcardType.getOffset());
return new ExtendsWildcardType(extendsWildcardType.getInnerType().acceptTV(this), extendsWildcardType.getOffset());
}
@Override

View File

@ -8,4 +8,3 @@ public class Lambda {
};
return lam1;
}
}

View File

@ -10,11 +10,11 @@ class Merge {
}
/*
sort(in){
var firstHalf = in.subList(1,2);
var secondHalf = in.subList(1,2);
return merge(sort(firstHalf), sort(secondHalf));
}
*/
}

View File

@ -1,29 +1,20 @@
import java.lang.String;
import java.lang.Integer;
import java.lang.Double;
import java.lang.String;
<<<<<<< HEAD
public class OL {
m(x) { return x + x; }
=======
class OL {
m(x) { return x + x; }
>>>>>>> 3fedbcc4a0e015ec8f5f6ccb77081f888135c850
}
<<<<<<< HEAD
public class OLMain {
=======
class OLMain {
>>>>>>> 3fedbcc4a0e015ec8f5f6ccb77081f888135c850
main(java.lang.Integer x) {
public class OLMain {
main(x) {
var ol;
ol = new OL();
return ol.m(x);