Răsfoiți Sursa

Added impl types to class names.

woollybah 8 ani în urmă
părinte
comite
b2990bf6e4
1 a modificat fișierele cu 12 adăugiri și 0 ștergeri
  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