Skip to content

Commit aca1f54

Browse files
committed
Add test
1 parent 534c698 commit aca1f54

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
Short closures: ast export
3+
--INI--
4+
zend.assertions=1
5+
--FILE--
6+
<?php
7+
8+
$a = 1;
9+
10+
assert(#[Attr] fn(DateTime $dt) use($a): DateTime {
11+
return 1;
12+
} && false);
13+
14+
--EXPECTF--
15+
Fatal error: Uncaught AssertionError: assert(#[Attr] fn(DateTime $dt) use($a): DateTime {
16+
return 1;
17+
} && false) in %s:%d
18+
Stack trace:
19+
#0 %s(%d): assert(false, 'assert(#[Attr] ...')
20+
#1 {main}
21+
thrown in %s on line %d

0 commit comments

Comments
 (0)