com php-src: moar tests: Zend/tests/type_declarations/typed _properties_021.phpt Zend/tests/type_declaratio ns/typed_properties_022.phpt
| From: | Bob Weinand | Date: | Wed, 09 Mar 2016 13:16:00 +0000 |
| Subject: | com php-src: moar tests: Zend/tests/type_declarations/typed _properties_021.phpt Zend/tests/type_declaratio ns/typed_properties_022.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95700@lists.php.net to get a copy of this message | ||
Commit: d2ab6d2aa0d54b7161067213554ae77fd488d76b
Author: Joe Watkins <krakjoe@php.net> Wed, 9 Mar 2016 13:16:00 +0000
Parents: 373b2a5e19790d53ddb73ddbe34061551f51ef95
Branches: typed_ref_properties
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d2ab6d2aa0d54b7161067213554ae77fd488d76b
Log:
moar tests
Changed paths:
M Zend/tests/type_declarations/typed_properties_021.phpt
A Zend/tests/type_declarations/typed_properties_022.phpt
Diff:
diff --git a/Zend/tests/type_declarations/typed_properties_021.phpt
b/Zend/tests/type_declarations/typed_properties_021.phpt
index dcd21c9..b3e3fa0 100644
--- a/Zend/tests/type_declarations/typed_properties_021.phpt
+++ b/Zend/tests/type_declarations/typed_properties_021.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test typed properties delay type check on constant/ast
+Test typed properties delay type check on constant
--FILE--
<?php
class Foo {
diff --git a/Zend/tests/type_declarations/typed_properties_022.phpt
b/Zend/tests/type_declarations/typed_properties_022.phpt
new file mode 100644
index 0000000..4b62012
--- /dev/null
+++ b/Zend/tests/type_declarations/typed_properties_022.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Test typed properties delay type check on ast
+--FILE--
+<?php
+class Foo {
+ public int $bar = BAR::BAZ * 2;
+}
+
+$foo = new Foo();
+
+var_dump($foo->bar);
+?>
+--EXPECTF--
+Fatal error: Class 'BAR' not found in %s on line 6
+
+
+
+
+
+