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
No error on use of `unsafe_cast`
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
super_constraint_5.php
blob
52d5f78174b4294af849e8707b2f3d2c3f9f2aad
1
<
?hh
// strict
2
class
FooBase
{}
3
class
Foo
extends
FooBase
{}
4
class
FooDerived
extends
Foo
{}
5
function
bar
<
Tx super Tx1
,
Tx1 super Foo
,
Ty
as
Ty1
,
Ty1 super Foo
>(
6
Ty
$val
,
7
Tx
$dummy
,
8
):
Tx
{
9
return
$val
;
10
}
11
function
test
(
FooBase
$foo_base
,
FooDerived
$foo_derived
):
void
{
12
bar
(
$foo_derived
,
$foo_base
);
13
}