Fix Typing_reason.to_string's multiline behavior
commit50c41a7afe4327507297da4006f7e9693552bcd0
authorGabe Levi <glevi@fb.com>
Wed, 9 Apr 2014 02:01:05 +0000 (8 19:01 -0700)
committerSara Golemon <sgolemon@fb.com>
Wed, 9 Apr 2014 16:47:38 +0000 (9 09:47 -0700)
tree1616293c7509d8b26088208ec155d97d24ae70f9
parente8f92ba4a6802c217c46975e1f1e7ad021d448c0
Fix Typing_reason.to_string's multiline behavior

The to_string method for our typing reasons was concatinating together
multiple lines. This sort of looks ok sometimes, but it doesn't play well with
our json format or the indentation for our hh output. This changes to_string to
return a structured (pos, string) list.

Reviewed By: @jwatzman

Differential Revision: D1263804
14 files changed:
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_reason.ml
hphp/hack/src/typing/typing_utils.ml
hphp/hack/test/more_tests/condition_isset_member_call.php.exp
hphp/hack/test/more_tests/fake_members10.php.exp
hphp/hack/test/more_tests/fake_members11.php.exp
hphp/hack/test/more_tests/fake_members3.php.exp
hphp/hack/test/more_tests/fake_members4.php.exp
hphp/hack/test/more_tests/fake_members6.php.exp
hphp/hack/test/more_tests/fake_members8.php.exp
hphp/hack/test/more_tests/fake_members9.php.exp
hphp/hack/test/more_tests/gen_trait4.php.exp
hphp/hack/test/more_tests/generic_incompatible_implementation.php.exp
hphp/hack/test/more_tests/message_vector.php.exp