瀏覽代碼

improve error reporting for @:require(ident compare const)

Nicolas Cannasse 11 年之前
父節點
當前提交
95182a3d96
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      typeload.ml

+ 1 - 0
typeload.ml

@@ -1988,6 +1988,7 @@ let init_class ctx c p context_init herits fields =
 				| e :: l ->
 					let sc = match fst e with
 						| EConst (Ident s) -> s
+						| EBinop ((OpEq|OpNotEq|OpGt|OpGte|OpLt|OpLte) as op,(EConst (Ident s),_),(EConst ((Int _ | Float _ | String _) as c),_)) -> s ^ s_binop op ^ s_constant c
 						| _ -> ""
 					in
 					if not (Parser.is_true (Parser.eval ctx.com e)) then