Skip to content

Commit

Permalink
Swap props to negate tests
Browse files Browse the repository at this point in the history
Summary: `negateGuardProp` is not the correct way to negate a test: since we already have both the positive and the negated prop on hand, reversing the two is enough and correct.

Reviewed By: ilya-klyuchnikov

Differential Revision: D60386301

fbshipit-source-id: a761c205f9c76b7fa2f89f3a4ac21ee451045a98
  • Loading branch information
VLanvin authored and facebook-github-bot committed Jul 29, 2024
1 parent fce8776 commit 4bdc56f
Showing 1 changed file with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,20 +524,13 @@ See https://fb.me/eqwalizer_errors#incompatible_types
'c' is not compatible with 'a'

error: incompatible_types
┌─ eqwater/src/eqwater.erl:1297:21
┌─ eqwater/src/eqwater.erl:1291:43
1297 │ negate_number(N) -> N.
│ ^
│ │
│ N.
Expression has type: number() | atom()
Context expected type: number()
1291 │ negate_number_neg(N) when not (N == 1) -> N;
│ ^ N.
Expression has type: number()
Context expected type: 'ok'

See https://fb.me/eqwalizer_errors#incompatible_types

number() | atom() is not compatible with number()
because
atom() is not compatible with number()

33 ERRORS

0 comments on commit 4bdc56f

Please sign in to comment.