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
New inference: improved error message for unresolved type
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
shape_unification_disallows_providing_optional_field_where_required_field_is_consumed.php
blob
2ef43c2bae2526f5daf2f76836d32d1cff30f143
1
<
?hh
// partial
2
3
class
MyWrapper
<
T
> {}
4
5
function
take_shape
(
MyWrapper
<
shape
(
'x'
=>
int
)>
$x
):
void
{}
6
7
function
test
(
MyWrapper
<
shape
(
?
'x'
=>
int
)>
$x
):
void
{
8
take_shape
(
$x
);
9
}