Page MenuHomePhabricator

D8030.diff
No OneTemporary

D8030.diff

Index: src/parser/xhpast/__tests__/data/php-callable-typehint.php.expect
===================================================================
--- /dev/null
+++ src/parser/xhpast/__tests__/data/php-callable-typehint.php.expect
@@ -0,0 +1,139 @@
+{
+ "tree" : [
+ 9000,
+ 0,
+ 13,
+ [
+ [
+ 9006,
+ 0,
+ 12,
+ [
+ [
+ 9007,
+ 0,
+ 0
+ ],
+ [
+ 9004,
+ 2,
+ 12,
+ [
+ [
+ 9050,
+ 2,
+ 12,
+ [
+ [
+ 9005
+ ],
+ [
+ 9005
+ ],
+ [
+ 9013,
+ 4,
+ 4
+ ],
+ [
+ 9059,
+ 5,
+ 9,
+ [
+ [
+ 9060,
+ 6,
+ 8,
+ [
+ [
+ 9090,
+ 6,
+ 6
+ ],
+ [
+ 9047,
+ 8,
+ 8
+ ],
+ [
+ 9005
+ ]
+ ]
+ ]
+ ]
+ ],
+ [
+ 9005
+ ],
+ [
+ 9006,
+ 11,
+ 12
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ],
+ "stream" : [
+ [
+ 371,
+ 6
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 337,
+ 8
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 309,
+ 1
+ ],
+ [
+ 40,
+ 1
+ ],
+ [
+ 309,
+ 8
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 311,
+ 2
+ ],
+ [
+ 41,
+ 1
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 123,
+ 1
+ ],
+ [
+ 125,
+ 1
+ ],
+ [
+ 375,
+ 1
+ ]
+ ]
+}
Index: src/parser/xhpast/__tests__/data/php-callable-typehint.php.test
===================================================================
--- /dev/null
+++ src/parser/xhpast/__tests__/data/php-callable-typehint.php.test
@@ -0,0 +1,4 @@
+# pass
+<?php
+
+function f(callable $c) {}
Index: src/parser/xhpast/__tests__/data/php-class-expr.php.test
===================================================================
--- /dev/null
+++ src/parser/xhpast/__tests__/data/php-class-expr.php.test
@@ -0,0 +1,4 @@
+# fail-syntax, comment="Wrong, valid syntax in PHP 5.5, see T4334."
+<?php
+
+ClassName::{$y.$z}();
Index: src/parser/xhpast/__tests__/data/php-finally.php.test
===================================================================
--- /dev/null
+++ src/parser/xhpast/__tests__/data/php-finally.php.test
@@ -0,0 +1,2 @@
+# fail-syntax, comment="Wrong, supported in PHP 5.5, see T4334."
+<?php try {} catch (C $x) {} finally {}
Index: src/parser/xhpast/__tests__/data/php-short-array.php.test
===================================================================
--- /dev/null
+++ src/parser/xhpast/__tests__/data/php-short-array.php.test
@@ -0,0 +1,2 @@
+# fail-syntax, comment="Wrong, supported in PHP 5.4, see T4334."
+<?php [];
Index: src/parser/xhpast/__tests__/data/php-traits.php.test
===================================================================
--- /dev/null
+++ src/parser/xhpast/__tests__/data/php-traits.php.test
@@ -0,0 +1,26 @@
+# fail-syntax, comment="Wrong, supported in PHP 5.4, see T4334."
+<?php
+
+trait T {
+ function f() {}
+}
+
+class C {
+ use T;
+}
+
+class D {
+ use T, U;
+}
+
+class E {
+ use T, U {
+ T::x insteadof U;
+ T::x as y;
+ T::z as private z;
+ }
+}
+
+class F {
+ use Q { q as protected; }
+}

File Metadata

Mime Type
text/plain
Expires
May 20 2024, 6:36 PM (5 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6290822
Default Alt Text
D8030.diff (4 KB)

Event Timeline