浏览代码

Improved handling of object var case.
Fixes #77.

woollybah 10 年之前
父节点
当前提交
74086f1e78
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      ctranslator.bmx

+ 2 - 2
ctranslator.bmx

@@ -682,7 +682,7 @@ t:+"NULLNULLNULL"
 						If decl.scope.IsExtern()
 							Return decl.munged + Bra(TransArgs( args,decl, TransSubExpr( lhs ) ))
 						Else
-							Local class:String = TransSubExpr( lhs ) + "->clas" + tSuper
+							Local class:String = Bra(TransSubExpr( lhs )) + "->clas" + tSuper
 							Return class + "->" + TransFuncPrefix(cdecl, decl) + decl.ident+TransArgs( args,decl, TransSubExpr( lhs ) )
 						End If
 					End If
@@ -1194,7 +1194,7 @@ EndRem
 		Local t$
 
 		If expr.instanceExpr Then
-			t = "bbObjectNew(" + expr.instanceExpr.Trans() + "->clas)"
+			t = "bbObjectNew(" + Bra(expr.instanceExpr.Trans()) + "->clas)"
 		Else
 			If ClassHasObjectField(expr.classDecl) Then
 				t = "bbObjectNew(&" + expr.classDecl.actual.munged + ")"