Explorar o código

[python] generate Void as None

Dan Korostelev %!s(int64=4) %!d(string=hai) anos
pai
achega
b80eff3fd0
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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) })) ->