fix: mangle member name in deletion generator (#1458)

This commit is contained in:
Veit Heller 2023-02-28 09:34:12 +01:00 committed by GitHub
parent ca5774b1ae
commit ed2a4108c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -921,7 +921,7 @@ concreteDeleteTakePtr typeEnv env members =
memberDeletionGeneral :: String -> TypeEnv -> Env -> (String, Ty) -> String memberDeletionGeneral :: String -> TypeEnv -> Env -> (String, Ty) -> String
memberDeletionGeneral separator typeEnv env (memberName, memberType) = memberDeletionGeneral separator typeEnv env (memberName, memberType) =
case findFunctionForMember typeEnv env "delete" (typesDeleterFunctionType memberType) (memberName, memberType) of case findFunctionForMember typeEnv env "delete" (typesDeleterFunctionType memberType) (memberName, memberType) of
FunctionFound functionFullName -> " " ++ functionFullName ++ "(p" ++ separator ++ memberName ++ ");" FunctionFound functionFullName -> " " ++ functionFullName ++ "(p" ++ separator ++ mangle memberName ++ ");"
FunctionNotFound msg -> error msg FunctionNotFound msg -> error msg
FunctionIgnored -> " /* Ignore non-managed member '" ++ memberName ++ "' : " ++ show memberType ++ " */" FunctionIgnored -> " /* Ignore non-managed member '" ++ memberName ++ "' : " ++ show memberType ++ " */"