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

mention that a macro returned null when it did (closes #3225)

Simon Krajewski 11 жил өмнө
parent
commit
8f61a0bb83
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      typer.ml

+ 4 - 1
typer.ml

@@ -4562,7 +4562,10 @@ let type_macro ctx mode cpath f (el:Ast.expr list) p =
 					(EBlock [],p)
 				)
 			with Interp.Invalid_expr ->
-				error "The macro didn't return a valid result" p
+				if v = Interp.VNull then
+					error "Unexpected null value returned from macro" p
+				else
+					error "The macro didn't return a valid result" p
 	in
 	let e = (if ctx.in_macro then begin
 		(*