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

switch cases can be empty

Simon Krajewski 11 жил өмнө
parent
commit
1f9d138da3
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      genpy.ml

+ 2 - 1
genpy.ml

@@ -381,7 +381,8 @@ module Transformer = struct
 		in
 		let res = match rev_cases with
 			| [] ->
-				assert false
+				(* TODO: this can be handled better *)
+				null ae.a_expr.etype ae.a_expr.epos
 			| [case] ->
 				case_to_if case edef
 			| case :: cases ->