Permalink
Browse files

Use correct pass-by-ref kind for Import { Require }

Summary: As in title

Reviewed By: oulgen

Differential Revision: D7159464

fbshipit-source-id: 364295a31e3e343c4d72394af86307dc2b83be8c
  • Loading branch information...
vladima authored and hhvm-bot committed Mar 11, 2018
1 parent 9c40b63 commit 6a0bfbd335e6498010a41aa5582935644298b2a9
Showing with 1 addition and 1 deletion.
  1. +1 −1 hphp/hack/src/hhbc/emit_expression.ml
@@ -419,7 +419,7 @@ let get_passByRefKind is_splatted expr =
let rec from_non_list_assignment permissive_kind expr =
match snd expr with
| A.New _ | A.Lvar _ | A.Clone _
| A.Import ((A.Include | A.IncludeOnce), _) -> AllowCell
| A.Import ((A.Include | A.IncludeOnce | A.Require), _) -> AllowCell
| A.Binop(A.Eq None, (_, A.List _), e) ->
from_non_list_assignment WarnOnCell e
| A.Array_get(_, Some _) -> permissive_kind

0 comments on commit 6a0bfbd

Please sign in to comment.