Skip to content

Commit

Permalink
Merge b5d9109 into 0ecd49e
Browse files Browse the repository at this point in the history
  • Loading branch information
bobzhang committed Mar 14, 2018
2 parents 0ecd49e + b5d9109 commit 3cbf28f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vendor/ocaml/typing/env.ml
Expand Up @@ -1343,8 +1343,8 @@ and check_value_name name loc =
(* Note: we could also check here general validity of the
identifier, to protect against bad identifiers forged by -pp or
-ppx preprocessors. *)

if String.length name > 0 && (name.[0] = '#') then
if !Clflags.bs_only && name = "|." then raise (Error(Illegal_value_name(loc, name)))
else if String.length name > 0 && (name.[0] = '#') then
for i = 1 to String.length name - 1 do
if name.[i] = '#' then
raise (Error(Illegal_value_name(loc, name)))
Expand Down

0 comments on commit 3cbf28f

Please sign in to comment.