Commit a794fc9
committed
Fix internal closure comparison and expand test coverage
The previous comparison (orig_func == given_func) could never match for
internal closures since zend_get_closure_method_def() returns a pointer
to each closure's embedded copy. Compare function_name and scope instead.
Also handle the mixed user/internal type case explicitly.
Add tests for: userland first-class callables, cloned internal closures,
and cross-type (user vs internal) closure rejection.1 parent 3d1bc50 commit a794fc9
2 files changed
+53
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3448 | 3448 | | |
3449 | 3449 | | |
3450 | 3450 | | |
3451 | | - | |
| 3451 | + | |
| 3452 | + | |
3452 | 3453 | | |
3453 | 3454 | | |
3454 | 3455 | | |
3455 | 3456 | | |
3456 | 3457 | | |
3457 | 3458 | | |
3458 | 3459 | | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
3459 | 3463 | | |
3460 | | - | |
| 3464 | + | |
3461 | 3465 | | |
3462 | 3466 | | |
3463 | 3467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
47 | 66 | | |
48 | 67 | | |
49 | 68 | | |
50 | 69 | | |
51 | | - | |
52 | | - | |
| 70 | + | |
| 71 | + | |
53 | 72 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
57 | 76 | | |
58 | 77 | | |
59 | 78 | | |
60 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
61 | 96 | | |
62 | 97 | | |
63 | 98 | | |
| |||
70 | 105 | | |
71 | 106 | | |
72 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
73 | 111 | | |
74 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
75 | 115 | | |
0 commit comments