Browse Source

tower backend: make sure tower attr doesnt have same name as typename

new ivory lang typedef/struct output means we get a collision here
Pat Hickey 9 years ago
parent
commit
caa72b0596
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Gidl/Backend/Tower/Server.hs

+ 1 - 1
src/Gidl/Backend/Tower/Server.hs

@@ -109,7 +109,7 @@ attrsTowerConstructor i = typesig </> decl </> indent 2 body </> indent 2 ret
   decl = text "tower" <> constructor <+> text "ivals = do"
   body = stack
     [ text n <> text "_p <- towerAttr"
-       <+> dquotes (text aname)
+       <+> dquotes (text (aname ++ "_attr"))
        <+> parens (text n <+> text "ivals")
     | (aname, AttrMethod _ _)  <- interfaceMethods i
     , let n = userEnumValueName aname