Skip to content

Commit 73f9ca1

Browse files
committed
allow generics in non-static types
1 parent 2920fcf commit 73f9ca1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Zend/zend_language_parser.y

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,10 +882,11 @@ type_expr_without_static:
882882
| intersection_type_without_static { $$ = $1; }
883883
;
884884

885+
//TODO add generic type params to AST
885886
type_without_static:
886-
T_ARRAY { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_ARRAY); }
887+
T_ARRAY generic_type_parameters { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_ARRAY); }
887888
| T_CALLABLE { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_CALLABLE); }
888-
| name { $$ = $1; }
889+
| name generic_type_parameters { $$ = $1; }
889890
;
890891

891892
union_type_without_static_element:

0 commit comments

Comments
 (0)