Skip to content

Commit

Permalink
[hack] Clean up comments for expression dependent type tests
Browse files Browse the repository at this point in the history
Summary: 1. Left a comment in code that I forgot to remove before committing in Naming
2. Changed error message to use a possessive ' (s/classes/class')
3. More descriptive comments in a few tests

Reviewed By: @dabek

Differential Revision: D2250257
  • Loading branch information
dlreeves authored and facebook-github-bot-3 committed Jul 16, 2015
1 parent 74d0a50 commit 4d0555e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions hack/naming/naming.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1209,9 +1209,7 @@ and class_prop env x acc =
| Const _ -> acc
| AbsConst _ -> acc
| ClassVars (kl, h, cvl) when not (List.mem Static kl) ->
(* there are no covariance issues with private members *)
let forbid_this = false (*not (List.mem Private kl)*) in
let h = opt_map (hint ~forbid_this env) h in
let h = opt_map (hint env) h in
let cvl = List.map (class_prop_ env) cvl in
let cvl = List.map (fill_prop kl h) cvl in
cvl @ acc
Expand Down
2 changes: 1 addition & 1 deletion hack/utils/errors.ml
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ let this_hint_outside_class pos =

let this_type_forbidden pos =
add Naming.this_must_be_return pos
"The type \"this\" cannot be used as a constraint on a classes generic, \
"The type \"this\" cannot be used as a constraint on a class' generic, \
or as the type of a static member variable"

let lowercase_this pos type_ =
Expand Down

0 comments on commit 4d0555e

Please sign in to comment.