|
@@ -959,6 +959,10 @@ let rec make_constant_expression ctx ?(concat_strings=false) e =
|
|
|
Some (mk (TConst (TString (s1 ^ s2))) ctx.com.basic.tstring (punion e1.epos e2.epos))
|
|
|
| Some e1, Some e2 -> Some (mk (TBinop(op, e1, e2)) e.etype e.epos)
|
|
|
| _ -> None)
|
|
|
+ | TCast (e1, None) ->
|
|
|
+ (match make_constant_expression ctx e1 with
|
|
|
+ | None -> None
|
|
|
+ | Some e1 -> Some {e with eexpr = TCast(e1,None)})
|
|
|
| TParenthesis e | TMeta(_,e) -> Some e
|
|
|
| TTypeExpr _ -> Some e
|
|
|
(* try to inline static function calls *)
|