@@ -5478,15 +5478,15 @@ static zend_type zend_compile_single_typename(zend_ast *ast)
54785478 return (zend_type ) ZEND_TYPE_INIT_CODE (ast -> attr , 0 , 0 );
54795479 } else {
54805480 zend_string * class_name = zend_ast_get_str (ast );
5481- zend_uchar type = zend_lookup_builtin_type_by_name (class_name );
5481+ zend_uchar type_code = zend_lookup_builtin_type_by_name (class_name );
54825482
5483- if (type != 0 ) {
5483+ if (type_code != 0 ) {
54845484 if ((ast -> attr & ZEND_NAME_NOT_FQ ) != ZEND_NAME_NOT_FQ ) {
54855485 zend_error_noreturn (E_COMPILE_ERROR ,
54865486 "Type declaration '%s' must be unqualified" ,
54875487 ZSTR_VAL (zend_string_tolower (class_name )));
54885488 }
5489- return (zend_type ) ZEND_TYPE_INIT_CODE (type , 0 , 0 );
5489+ return (zend_type ) ZEND_TYPE_INIT_CODE (type_code , 0 , 0 );
54905490 } else {
54915491 const char * correct_name ;
54925492 zend_string * orig_name = zend_ast_get_str (ast );
@@ -5540,6 +5540,7 @@ static zend_type zend_compile_typename(
55405540 zend_ast * ast , zend_bool force_allow_null , zend_bool use_arena ) /* {{{ */
55415541{
55425542 zend_bool allow_null = force_allow_null ;
5543+ zend_ast_attr orig_ast_attr = ast -> attr ;
55435544 zend_type type = ZEND_TYPE_INIT_NONE (0 );
55445545 if (ast -> attr & ZEND_TYPE_NULLABLE ) {
55455546 allow_null = 1 ;
@@ -5649,6 +5650,7 @@ static zend_type zend_compile_typename(
56495650 }
56505651 }
56515652
5653+ ast -> attr = orig_ast_attr ;
56525654 return type ;
56535655}
56545656/* }}} */
0 commit comments