浏览代码

[macro] make Context.getType return `null` for unknown types because that's how it's documented

Simon Krajewski 10 年之前
父节点
当前提交
2dfa148e77
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      interp.ml

+ 1 - 1
interp.ml

@@ -2168,7 +2168,7 @@ let macro_lib =
 			match s with
 			| VString s ->
 				(match (get_ctx()).curapi.get_type s with
-				| None -> failwith ("Type not found '" ^ s ^ "'")
+				| None -> VNull
 				| Some t -> encode_type t)
 			| _ -> error()
 		);