repo.or.cz
/
hiphop-php.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add runtime enforcement for instance properties
[hiphop-php.git]
/
hphp
/
test
/
slow
/
modules
/
instance-properties-incdec-throw.php
blob
3e049d750e5f64a3b7133e61773133db27173d0d
1
<
?hh
2
<<
file
:
__EnableUnstableFeatures
(
"modules"
)>>
3
4
5
<<
__EntryPoint
>>
6
function
main
():
void
{
7
include
"module.inc"
;
8
include
"instance-properties.inc"
;
9
ok
();
10
$x
=
new
Foo
(
vec
[]);
11
try
{
12
$x
->
x++
;
// error, cannot incdec internal property
13
}
catch
(
Exception
$e
) {
echo
$e
->
getMessage
().
"
\n
"
; }
14
15
}