fix param names of instance methods. idx==0 is the this parameter.

This commit is contained in:
Volker Berlin 2019-12-24 13:22:25 +01:00
parent b4ae2757c7
commit 2ebc771c55

View File

@ -580,6 +580,7 @@ public class ModuleGenerator {
if( !isStatic ) {
StructType instanceType = types.valueOf( name.className );
writer.writeMethodParam( "param", instanceType, "this" );
paramCount++;
}
Iterator<AnyType> parser = name.getSignature( types );
AnyType type;
@ -598,9 +599,6 @@ public class ModuleGenerator {
}
}
if( codeBuilder != null ) {
if( !isStatic ) {
paramCount++;
}
List<AnyType> localTypes = codeBuilder.getLocalTypes( paramCount );
for( int i = 0; i < localTypes.size(); i++ ) {
type = localTypes.get( i );