git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: fix 0.8.2 merge (extra type check for fn decl arg count)
4fb8d81Andy Arvanitis
src/Language/PureScript/CodeGen/Cpp.hs+3−1
@@ -166,7 +166,9 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
166 (convertNestedLambdas $ asReturnBlock block)
166 (convertNestedLambdas $ asReturnBlock block)
167 return (CppComment com fn)
167 return (CppComment com fn)
168 where
168 where
169− argcnt = maybe 0 countArgs ty
169+ argcnt | Just t <- ty = countArgs t
170+ | Just (t, _, _) <- M.lookup (mn, ident) (E.names env) = countArgs t
171+ | otherwise = 0
170 name = identToCpp ident
172 name = identToCpp ident
171 aty = Just $ CppAny [CppConst, CppRef]
173 aty = Just $ CppAny [CppConst, CppRef]
172 rty = Just $ CppAny []
174 rty = Just $ CppAny []