remove unused thisMeth type. Returns are combined and already checked against return Type

This commit is contained in:
fanoll 2024-06-10 12:53:59 +02:00
parent 3d351ee02b
commit 98b02446ba

View File

@ -21,7 +21,7 @@ typeCheckMethodDeclaration (MethodDeclaration retType name params body) classFie
let
-- Combine class fields with method parameters to form the initial symbol table for the method
methodParams = [(identifier, dataType) | ParameterDeclaration dataType identifier <- params]
initialSymtab = ("thisMeth", retType) : classFields ++ methodParams
initialSymtab = classFields ++ methodParams
checkedBody = typeCheckStatement body initialSymtab classes
bodyType = getTypeFromStmt checkedBody
-- Check if the type of the body matches the declared return type