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
/
enum_6.php
blob
b5cb1d2b48a3ee9cce3b889271c16cb7f2e66349
1
//// newtype.php
2
<
?hh
// strict
3
4
newtype bar
=
bool
;
5
const
bar truthy_foo
=
true
;
6
7
//// def.php
8
<
?hh
// strict
9
10
abstract class
Enum
<
T
> {
11
}
12
13
newtype foo
=
bar
;
14
class
C1
{
15
const
foo FOO
=
truthy_foo
;
16
}
17
18
//// use.php
19
<
?hh
// strict
20
21
// Should fail because foo isn't an int or a string
22
class
C2
extends
Enum
<
foo
> {
23
const
foo FOO
=
C1
::
FOO
;
24
}