Przeglądaj źródła

[python] generate Void as None

Dan Korostelev 4 lat temu
rodzic
commit
b80eff3fd0
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      src/generators/genpy.ml

+ 2 - 0
src/generators/genpy.ml

@@ -1215,6 +1215,8 @@ module Printer = struct
 		match e.eexpr with
 			| TConst ct ->
 				print_constant ct
+			| TTypeExpr (TAbstractDecl { a_path = [],"Void" }) ->
+				"None"
 			| TTypeExpr mt ->
 				print_module_type mt
 			| (TLocal v | TParenthesis({ eexpr = (TLocal v) })) ->