Shapes self class consts
commit7c71fa99f361dc1e26931bc8773c072ad3e28c7a
authorAlexander Chow <achow@fb.com>
Thu, 24 Sep 2015 22:26:04 +0000 (24 15:26 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Thu, 24 Sep 2015 23:00:41 +0000 (24 16:00 -0700)
tree47e678e3688c7958cbbf4e7515a315e08aed4f03
parent50310a11b0bffdb10cbadb4b48d21ab3f94d6205
Shapes self class consts

Summary: Can access shape field by self::KEY_NAME when shape is defined by Foo::KEY_NAME
for self = Foo

Reviewed By: @dabek

Differential Revision: D2473133
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_shapes.ml
hphp/hack/src/typing/typing_utils.ml
hphp/hack/test/typecheck/shape_self_class_const.php [new file with mode: 0644]
hphp/hack/test/typecheck/shape_self_class_const.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/shape_self_class_const_mismatch.php [new file with mode: 0644]
hphp/hack/test/typecheck/shape_self_class_const_mismatch.php.exp [new file with mode: 0644]