forked from JavaTX/JavaCompilerCore
Merge branch 'refactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into refactoring
This commit is contained in:
commit
b67816775e
@ -171,7 +171,11 @@ public class ClassGenerator extends ClassGen{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addMethod(Method m) {
|
public void addMethod(Method m) {
|
||||||
String methodNameAndTypes = m.getName()+Arrays.toString(m.getArgumentTypes());
|
String methodNameAndTypes = m.getReturnType().getSignature()+m.getName()+Arrays.toString(m.getArgumentTypes());
|
||||||
|
//PL 1016-05-03 ersetzt:
|
||||||
|
//m.getName()+Arrays.toString(m.getArgumentTypes());
|
||||||
|
//Hier sollten alle Maxima der Funktionstypen (arg-typ möglichst gross,
|
||||||
|
//return-Typ moeglichst klein) ermittelt werden (s. pppl 2008)
|
||||||
|
|
||||||
if(methodsNamesAndTypes.contains(methodNameAndTypes)){
|
if(methodsNamesAndTypes.contains(methodNameAndTypes)){
|
||||||
return;
|
return;
|
||||||
|
@ -1,6 +1,19 @@
|
|||||||
class OL {
|
class OL {
|
||||||
|
|
||||||
m(x) { return x + x; }
|
m(x) { return x + x; }
|
||||||
|
|
||||||
Boolean m(Boolean x) {return x; }
|
m(Boolean x) { return x; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Main {
|
||||||
|
|
||||||
|
main(x) {
|
||||||
|
ol;
|
||||||
|
ol = new OL();
|
||||||
|
return ol.m(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user