Skip to content

Commit

Permalink
Fix checkValidEnum outputting non-unique names when cViaASM is en…
Browse files Browse the repository at this point in the history
…abled
  • Loading branch information
jorisdral committed Apr 4, 2024
1 parent a6d9f73 commit a428a8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CrossCodegen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ outValidityCheck viaAsm s@(Special pos key value) uniq =
case parseEnum value of
Nothing -> ""
Just (_,_,enums) | viaAsm ->
concatMap (\(hName,cName) -> validConstTestViaAsm (fromMaybe "noKey" (ATT.trim `fmap` hName) ++ show uniq) cName) enums
concatMap (\(hName,cName) -> validConstTestViaAsm (fromMaybe cName (ATT.trim `fmap` hName) ++ show uniq) cName) enums
Just (_,_,enums) ->
"void _hsc2hs_test" ++ show uniq ++ "()\n{\n" ++
concatMap (\(_,cName) -> validConstTest cName) enums ++
Expand Down

0 comments on commit a428a8c

Please sign in to comment.