diff --git a/src/parser/xhpast/__tests__/data/return-type.php.test b/src/parser/xhpast/__tests__/data/return-type.php.test --- a/src/parser/xhpast/__tests__/data/return-type.php.test +++ b/src/parser/xhpast/__tests__/data/return-type.php.test @@ -246,7 +246,7 @@ 46, [ [ - 0, + 9013, 45, 45 ], @@ -354,7 +354,7 @@ 72, [ [ - 0, + 9013, 71, 71 ], @@ -798,7 +798,7 @@ 170, [ [ - 0, + 9013, 169, 169 ], @@ -1090,7 +1090,7 @@ 239, [ [ - 0, + 9013, 238, 238 ], @@ -2231,4 +2231,4 @@ 2 ] ] -} + } diff --git a/src/parser/xhpast/bin/PhutilXHPASTBinary.php b/src/parser/xhpast/bin/PhutilXHPASTBinary.php --- a/src/parser/xhpast/bin/PhutilXHPASTBinary.php +++ b/src/parser/xhpast/bin/PhutilXHPASTBinary.php @@ -8,7 +8,7 @@ * This is the version that would be obtained with an up-to-date XHPAST * build. The //actual// XHPAST build version may vary. */ - const EXPECTED_VERSION = '7.1.0'; + const EXPECTED_VERSION = '7.1.1'; /** * The XHPAST build version. diff --git a/support/xhpast/parser.y b/support/xhpast/parser.y --- a/support/xhpast/parser.y +++ b/support/xhpast/parser.y @@ -1087,7 +1087,7 @@ } | ':' '?' type { $$ = NNEW(n_DECLARATION_RETURN); - $$->appendChild($2); + $$->appendChild(NTYPE($2, n_STRING)); $$->appendChild($3); } | ':' type { diff --git a/support/xhpast/parser.yacc.cpp b/support/xhpast/parser.yacc.cpp --- a/support/xhpast/parser.yacc.cpp +++ b/support/xhpast/parser.yacc.cpp @@ -4725,7 +4725,7 @@ #line 1088 "parser.y" /* yacc.c:1646 */ { (yyval) = NNEW(n_DECLARATION_RETURN); - (yyval)->appendChild((yyvsp[-1])); + (yyval)->appendChild(NTYPE((yyvsp[-1]), n_STRING)); (yyval)->appendChild((yyvsp[0])); } #line 4732 "parser.yacc.cpp" /* yacc.c:1646 */ diff --git a/support/xhpast/xhpast.cpp b/support/xhpast/xhpast.cpp --- a/support/xhpast/xhpast.cpp +++ b/support/xhpast/xhpast.cpp @@ -12,7 +12,7 @@ int main(int argc, char* argv[]) { if (argc != 1) { // Coupling: modify also src/parser/xhpast/bin/PhutilXHPASTBinary.php - cout << "7.1.0\n"; + cout << "7.1.1\n"; return 0; }