@@ -1715,8 +1715,12 @@ let init_class ctx c p context_init herits fields =
let rec loop = function
| [] -> check_require l
| e :: l ->
+ let sc = match fst e with
+ | EConst (Ident s) -> s
+ | _ -> ""
+ in
if not (Parser.is_true (Parser.eval ctx.com e)) then
- Some ("condition",(match List.rev l with (EConst (String msg),_) :: _ -> Some msg | _ -> None))
+ Some (sc,(match List.rev l with (EConst (String msg),_) :: _ -> Some msg | _ -> None))
else
loop l
in
@@ -762,6 +762,9 @@ let rec acc_get ctx g p =
assert false
let error_require r p =
+ if r = "" then
+ error "This field is not available with the current compilation flags" p
+ else
let r = if r = "sys" then
"a system platform (php,neko,cpp,etc.)"
else try