HomePhabricator

Support for variance (+/-) annotations on type-parameters

Authored by Julien Verlaguet <julienv@fb.com>.

Description

Support for variance (+/-) annotations on type-parameters

Summary: We want to be able to write:
class X<+T1, -T2> {}
To be able to tell the type-checker that T1 is covariant and T2 is contravariant.
The annotation is ignored (dropped) by the runtime.

Reviewed By: @elgenie, @paroski

Differential Revision: D1512765

Details

Committed
hhvm-botAug 25 2014, 7:00 PM
Parents
rOSHD934f2cd1b623: Fix inner class specialization on Box
Branches
Unknown
Tags
Unknown
ChangeId
None

Event Timeline

hhvm-bot <hhvm-bot@fb.com> committed rOSHD69a25c7f6b82: Support for variance (+/-) annotations on type-parameters (authored by Julien Verlaguet <julienv@fb.com>).Aug 25 2014, 7:00 PM