forked from JavaTX/JavaCompilerCore
Verbesserung von getSpecializedFunNRefType -> jetzt werden nur noch Generics und TPHs als Parameter übergeben.
Zuvor wurden zu viele Parameter übergeben.
This commit is contained in:
parent
e2d76d314a
commit
722d897d4b
@ -174,6 +174,8 @@ public final class FunNGenerator implements FunNUtilities{
|
||||
return new RefType(new JavaClassName(getSpecializedClassName(argumentTypes, returnType)),
|
||||
Stream
|
||||
.concat(argumentTypes.stream(), Stream.of(returnType))
|
||||
.filter(t -> t instanceof GenericRefType ||
|
||||
t instanceof TypePlaceholder)
|
||||
.collect(Collectors.toList()),null);
|
||||
}
|
||||
}
|
||||
|
@ -73,13 +73,13 @@ public class FunNGeneratorTest {
|
||||
@Test
|
||||
public void signature_IntInt(){
|
||||
var classSignature = funNGenerator.getSpecializedSignature(Arrays.asList(integerType), integerType);
|
||||
assertEquals("LFun1$$Ljava$lang$Integer$_$Ljava$lang$Integer$_$<Ljava/lang/Integer;Ljava/lang/Integer;>;", classSignature);
|
||||
assertEquals("LFun1$$Ljava$lang$Integer$_$Ljava$lang$Integer$_$;", classSignature);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void signature_IntT(){
|
||||
var classSignature = funNGenerator.getSpecializedSignature(Arrays.asList(integerType), genericT);
|
||||
assertEquals("LFun1$$Ljava$lang$Integer$_$LT$_$<Ljava/lang/Integer;TT;>;", classSignature);
|
||||
assertEquals("LFun1$$Ljava$lang$Integer$_$LT$_$<TT;>;", classSignature);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user