Browse Source

Nicer fix for using issue.

Mark Sibly 8 năm trước cách đây
mục cha
commit
467d93c646
1 tập tin đã thay đổi với 2 bổ sung10 xóa
  1. 2 10
      src/mx2cc/translator_cpp.monkey2

+ 2 - 10
src/mx2cc/translator_cpp.monkey2

@@ -446,23 +446,15 @@ Class Translator_CPP Extends Translator
 					
 					If Not func.IsMethod Continue
 					
-					Local superType:=ctype.superType
-					While superType
-						If func.scope=superType.scope exit
-						superType=superType.superType
-					Wend
-					If Not superType Continue
-						
-				'	If Not func.IsMethod Or func.scope<>ctype.superType.scope Continue
+					If func.cscope.ctype=ctype Continue
 					
-					Local superName:=ClassName( superType )
+					Local superName:=ClassName( func.cscope.ctype )
 					
 					Local sym:=superName+"::"+FuncName( func )
 					If done[sym] Continue
 					done[sym]=True
 					
 					Emit( "using "+sym+";" )
-'					Emit( "using "+superName+"::"+sym+";" )
 				Next
 			Next
 		Endif