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

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

Nicolas Cannasse 11 жил өмнө
parent
commit
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 ->
 				| e :: l ->
 					let sc = match fst e with
 					let sc = match fst e with
 						| EConst (Ident s) -> s
 						| 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
 					in
 					if not (Parser.is_true (Parser.eval ctx.com e)) then
 					if not (Parser.is_true (Parser.eval ctx.com e)) then