2
0
Эх сурвалжийг харах

Fixed another mx2cc deps issue.

Mark Sibly 8 жил өмнө
parent
commit
91de3123e5

+ 2 - 2
src/mx2cc/mx2cc.monkey2

@@ -21,11 +21,11 @@ Using mx2..
 
 Global StartDir:String
 
-Const TestArgs:="mx2cc makedocs"
+'Const TestArgs:="mx2cc makedocs"
 
 'Const TestArgs:="mx2cc makemods -target=ios std"' std"
  
-'Const TestArgs:="mx2cc makeapp -target=desktop src/mx2cc/test.monkey2"
+Const TestArgs:="mx2cc makeapp -target=desktop src/mx2cc/test.monkey2"
 
 'To build with old mx2cc...
 '

+ 24 - 1
src/mx2cc/test.monkey2

@@ -1,5 +1,28 @@
 
-#Import "test.java"
+#Import "<std>"
+#Import "<mojo>"
+#Import "<mojox>"
+#Import "test2"
+
+Using std..
+Using mojo..
+Using mojox..
+
+Class MyWindow Extends Window
+	Method Testing()
+		
+		'Local dummy:=New CheckButton( "" ) ' uncomment this to 'fix' error
+		
+		Local widgets:=New Widgets
+		Local v:View=widgets.checkBox
+		
+	End
+End
 
 Function Main()
+
+	New AppInstance
+	New MyWindow
+	App.Run()	
 End
+

+ 2 - 4
src/mx2cc/test2.monkey2

@@ -1,5 +1,3 @@
-
-Namespace test
-
-Class Socket
+Class Widgets
+	Field checkBox:CheckButton
 End

+ 4 - 2
src/mx2cc/translator_cpp.monkey2

@@ -1569,9 +1569,11 @@ Class Translator_CPP Extends Translator
 	
 		Local src:="("+Trans( value.value )+")"
 	
+		Uses( value.type )			'uses dst type
+			
 		If value.type.Equals( value.value.type ) Return src
-	
-		Uses( value.type )
+
+		Uses( value.value.type )	'...and src type
 		
 		If IsCValueType( value.type ) Return TransType( value.type )+src