Fix HPHP's parser when handling generics

We need to allow any type after the AS keyword, including xhp class names.
Esse commit está contido em:
Alok Menghrajani
2013-06-24 11:15:04 -07:00
commit de Sara Golemon
commit 7a9769a95b
3 arquivos alterados com 209 adições e 204 exclusões
+3
Ver Arquivo
@@ -8,5 +8,8 @@ class B<T> extends A<T> { }
function foo<T, Q as A<T> >(Q $thing, T $item): T {
return $thing->getT($item);
}
class C<T as A<int>> {}
class D<T as :x:base> {}
class E<T as A<:x:base>> {}
echo "Done\n";
+1
Ver Arquivo
@@ -113,6 +113,7 @@ static int getNextTokenType(int t) {
case T_BOOL_CAST:
case T_UNSET_CAST:
case T_UNRESOLVED_LT:
case T_AS:
return NextTokenType::XhpTag |
NextTokenType::XhpClassName;
case ',': case '(': case '|':
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff