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
Error on self::class on non final classes
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
covariance8.php
blob
6129e5c86e84b9af40459cc026d79bf737e3a063
1
//// file1.php
2
<
?hh
// partial
3
4
newtype ID
<
T
> =
int
;
5
newtype UID
<
T
>
as
ID
<
T
> =
int
;
6
newtype OID
<
T
>
as
ID
<
T
> =
int
;
7
8
//// file2.php
9
<
?hh
// partial
10
11
class
A
{}
12
class
B
extends
A
{}
13
14
function
takesIDA
(
ID
<
A
>
$x
):
void
{}
15
function
test
(
UID
<
B
>
$x
):
void
{
16
takesIDA
(
$x
);
17
}