Fix bug in way function types are serialized to the Code Model.
commite3831e6f5e064d0a3548e326e2891a2508dc22cd
authorHerman Venter <hermanv@fb.com>
Wed, 19 Feb 2014 00:14:02 +0000 (18 16:14 -0800)
committerSara Golemon <sgolemon@fb.com>
Fri, 21 Feb 2014 00:25:01 +0000 (20 16:25 -0800)
treef6d18aa271bb0d1530531c6b173f6297046478b6
parent6f96374082d8fa7dac74431e133ecbde456096a4
Fix bug in way function types are serialized to the Code Model.

The serialization code did not deal correctly with the special case where a function type has no argument types. The code for converting a Code Model to PHP text suffered from a similar problem.

Reviewed By: @paroski

Differential Revision: D1176389
hphp/compiler/type_annotation.cpp
hphp/system/php/code_model/CodeModelToPHP.ns.php
hphp/test/ext/get_code_model_for.php
hphp/test/ext/get_code_model_for.php.expect