浏览代码

avoid unused code warnings for $type (closes #5975)

Simon Krajewski 8 年之前
父节点
当前提交
082fd53d22
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/typing/typer.ml

+ 1 - 0
src/typing/typer.ml

@@ -4108,6 +4108,7 @@ and type_call ctx e el (with_type:with_type) p =
 	| (EConst (Ident "$type"),_) , [e] ->
 		let e = type_expr ctx e Value in
 		ctx.com.warning (s_type (print_context()) e.etype) e.epos;
+		let e = Display.Diagnostics.secure_generated_code ctx e in
 		e
 	| (EField(e,"match"),p), [epat] ->
 		let et = type_expr ctx e Value in