Permalink
Browse files

Don't crash on inlined definitions, raise error instead

Summary: Why

Reviewed By: oulgen, dabek

Differential Revision: D8383845
  • Loading branch information...
jamesjwu authored and fredemmott committed Jun 12, 2018
1 parent 05f97eb commit 9ee09d4e654852135a0595285f44fca66841b5dd
Showing with 1 addition and 1 deletion.
  1. +1 −1 hphp/hack/src/naming/naming.ml
@@ -1873,7 +1873,7 @@ module Make (GetLocals : GetLocals) = struct
| Foreach (e, aw, ae, b)-> foreach_stmt env e aw ae b
| Try (b, cl, fb) -> try_stmt env st b cl fb
| Def_inline _ ->
failwith "Naming of inlined definitions not (yet) supported."
Errors.experimental_feature p "inlined definitions"; N.Expr (p, N.Any)
| Expr (cp, Call ((p, Id (fp, fn)), hl, el, uel))
when fn = SN.SpecialFunctions.invariant ->
(* invariant is subject to a source-code transform in the HHVM

0 comments on commit 9ee09d4

Please sign in to comment.