Use naming convention to determine variance of generic parameter
commite6777b669e8fec01a7ca06aa63fa7d77c6fa5238
authorAndrew Kennedy <akenn@fb.com>
Mon, 30 Mar 2020 17:59:56 +0000 (30 10:59 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 30 Mar 2020 18:21:52 +0000 (30 11:21 -0700)
tree963c76ebf71a43d5818238b8699c80d16a0a99bc
parentfab0c82b8237b6286be1865ed36da59fd5c6ba7c
Use naming convention to determine variance of generic parameter

Summary: The direct decl parser does not yet implement variance on generic parameters. Until it does, use the name of the type parameter to determine variance, so we can test subtyping wrt variance. Type parameters starting `TP` are assumed covariant, those starting `TN` are assumed contravariant. All others invariant.

Differential Revision: D20735538

fbshipit-source-id: c1f5cef58424d9a39bf4ed9a64fab621fcebc2e9
hphp/hack/src/typing/typing_subtype.rs