소스 검색

[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()
 		);