Skip to content

Commit 5faee30

Browse files
committed
Improve comment
1 parent 00b7f83 commit 5faee30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_inheritance.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,9 @@ static inheritance_status do_inheritance_check_on_method(
11361136
#define SEPARATE_METHOD() do { \
11371137
if ((flags & ZEND_INHERITANCE_LAZY_CHILD_CLONE) \
11381138
&& child_scope != ce \
1139-
/* Trait scopes are fixed after inheritance. However, they are always duplicated. */ \
1139+
/* Trait methods have already been separated at this point. However, their */ \
1140+
/* scope isn't fixed until after inheritance checks to preserve the scope */ \
1141+
/* in error messages. Skip them here explicitly. */ \
11401142
&& !(child_scope->ce_flags & ZEND_ACC_TRAIT) \
11411143
&& child->type == ZEND_USER_FUNCTION) { \
11421144
/* op_array wasn't duplicated yet */ \

0 commit comments

Comments
 (0)