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)
commit4fb8d816155750e602782f2e789fe2c6bc305a20 authorAndy Arvanitis <andyarvanitis@gmail.com> dateThu 17 Mar 2016, 22:08 (11 years ago) parentc2a3f9b
1 file changed+3−1
src/Language/PureScript/CodeGen/Cpp.hs+3−1
src/Language/PureScript/CodeGen/Cpp.hs+3−1
@@ -166,7 +166,9 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
166166 (convertNestedLambdas $ asReturnBlock block)
167167 return (CppComment com fn)
168168 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
170172 name = identToCpp ident
171173 aty = Just $ CppAny [CppConst, CppRef]
172174 rty = Just $ CppAny []