You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flow][refactor] rename "cond" param of statement.ml to "encl_ctx"
Summary:
Before this change the `cond` parameter in several function in statement.ml would represent the conditional syntactic context. It only had two variants, or was absent, which meant that we were not in a conditional context.
Moving forward we will leverage this parameter to inform us about the enclosing syntactic context. The information we will need for natural inference extends beyond just being in a conditional context. For example, we care about whether we are an an indexer context. To accommodate for this, we rename the type `Type.cond_context` to `Type.enclosing_context`. We also rename the parameter `cond` to `encl_ctx` in statement.ml.
Also, to make sure I've addressed all cites where this was used before, I've changed its type from optional to non-optional, but I've included a `NoContext` variant.
Changelog: [internal]
Reviewed By: SamChou19815
Differential Revision: D70802814
fbshipit-source-id: 13d39f21054f8cf6312bd58af24cd812286ffab8
0 commit comments