Browse Source

[python] print «pass» on a new line for empty classes/interfaces

Dan Korostelev 11 years ago
parent
commit
0f5fccfd51
1 changed files with 4 additions and 1 deletions
  1. 4 1
      genpy.ml

+ 4 - 1
genpy.ml

@@ -1999,7 +1999,10 @@ module Generator = struct
 				| [] -> c.cl_constructor = None
 				| _ -> c.cl_interface
 			in
-			if use_pass then spr ctx "\tpass";
+			if use_pass then begin
+				newline ctx;
+				spr ctx "\tpass";
+			end
 		end;
 		gen_class_init ctx c