com php-src: add test for that^: Zend/tests/type_declarations /typed_properties_021.phpt

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

« previous php.cvs (#95587) next »