Skip to content

Commit

Permalink
[flow] Use RString for reason of hint for string literal under autoco…
Browse files Browse the repository at this point in the history
…mplete

Summary:
It shouldn't matter here, since this is never visible to the user. However, we still want to get rid of RCustom, so let's just use the description that we are also using below.

Changelog: [interna]

Reviewed By: gkz

Differential Revision: D56493014

fbshipit-source-id: 49c89e7b25379a472263df64281f67a3b8004f68
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Apr 23, 2024
1 parent 646b4f0 commit fc5939e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typing/statement.ml
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ module Make
let string_literal_value cx ~as_const loc value =
if Type_inference_hooks_js.dispatch_literal_hook cx loc then
let (_, lazy_hint) = Type_env.get_hint cx loc in
let hint = lazy_hint (mk_reason (RCustom "literal") loc) in
let hint = lazy_hint (mk_reason RString loc) in
let error () = EmptyT.at loc in
Type_hint.with_hint_result hint ~ok:Base.Fn.id ~error
else if as_const then
Expand Down

0 comments on commit fc5939e

Please sign in to comment.