|
@@ -316,7 +316,10 @@ let inline_constructors ctx original_e =
|
|
let iv_is_const iv = match iv.iv_kind with IVKField(_,_,Some(_)) -> true | _ -> false in
|
|
let iv_is_const iv = match iv.iv_kind with IVKField(_,_,Some(_)) -> true | _ -> false in
|
|
if is_lvalue && iv_is_const fiv then raise Not_found;
|
|
if is_lvalue && iv_is_const fiv then raise Not_found;
|
|
if fiv.iv_closed then raise Not_found;
|
|
if fiv.iv_closed then raise Not_found;
|
|
- if not is_lvalue && fiv.iv_state == IVSUnassigned then raise Not_found;
|
|
|
|
|
|
+ if not is_lvalue && fiv.iv_state == IVSUnassigned then (
|
|
|
|
+ ctx.com.warning ("Constructor inlining cancelled because of use of uninitialized member field " ^ fname) ethis.epos;
|
|
|
|
+ raise Not_found
|
|
|
|
+ );
|
|
if not captured then cancel_iv fiv efield.epos;
|
|
if not captured then cancel_iv fiv efield.epos;
|
|
IOFInlineVar(fiv)
|
|
IOFInlineVar(fiv)
|
|
with Not_found ->
|
|
with Not_found ->
|