correct the implementation of converToTypedAST in typedclass

This commit is contained in:
Ahmad 2024-05-09 15:52:33 +02:00
parent 65dd9152f0
commit 8d72f0ff1b

View File

@ -64,18 +64,18 @@ public class TypedClass implements TypedNode {
for (Declaration field : c.fieldDeclarations()) { for (Declaration field : c.fieldDeclarations()) {
TypedField typedField = new TypedField(); TypedField typedField = new TypedField();
typedClass.getTypedFields().add(typedField.unTypedFieldToTypedField(field)); typedClass.getTypedFields().add(typedField.convertToTypedField(localVar, classes, field));
} }
for (Method method : c.methods()) { for (Method method : c.methods()) {
TypedMethod typedMethod = new TypedMethod(); TypedMethod typedMethod = new TypedMethod();
typedClass.getTypedMethods().add(typedMethod.unTypedMethodToTypedMethod(method)); typedClass.getTypedMethods().add(typedMethod.convertToTypedMethod(localVar, classes,method));
} }
for (Constructor constructor : c.constructors()) { for (Constructor constructor : c.constructors()) {
TypedConstructor typedConstructor = new TypedConstructor(); TypedConstructor typedConstructor = new TypedConstructor();
typedClass.getTypedConstructors().add(typedConstructor.unTypedContructorToTypedConstructor(constructor)); typedClass.getTypedConstructors().add(typedConstructor.constructorToTypedConstructor(localVar, classes, constructor));
} }
return typedClass; return typedClass;