瀏覽代碼

Added impl types to class names.

woollybah 8 年之前
父節點
當前提交
b2990bf6e4
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      translator.bmx

+ 12 - 0
translator.bmx

@@ -443,6 +443,12 @@ Type TTranslator
 '		Case "cpp"
 			If TModuleDecl( decl.scope )
 				munged=decl.ModuleScope().munged+"_"+id
+				
+				If TClassDecl(decl) And TClassDecl(decl).instArgs Then
+					For Local ty:TType = EachIn TClassDecl(decl).instArgs
+						munged :+ TransMangleType(ty)
+					Next
+				End If
 			EndIf
 
 			If TModuleDecl( decl )
@@ -459,6 +465,12 @@ Type TTranslator
 				If decl.scope Then
 					munged = decl.scope.munged + "_" + id
 					
+					If TClassDecl(decl) And TClassDecl(decl).instArgs Then
+						For Local ty:TType = EachIn TClassDecl(decl).instArgs
+							munged :+ TransMangleType(ty)
+						Next
+					End If
+					
 					' fields are lowercase with underscore prefix.
 					' a function pointer with FUNC_METHOD is a field function pointer.
 					If TFieldDecl(decl) Or (TFuncDecl(decl) And (decl.attrs & FUNC_METHOD) And (decl.attrs & FUNC_PTR)) Then