New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / reserved_keywords.php
blobd7e7081c9e1badf6d5d830ac1d3b380d44c7c12f
1 <?hh // partial
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
12 class A {
13 private int $if = 0;
14 private int $else = 0;
15 private int $function = 0;
16 private int $true = 0;
17 private int $false = 0;
18 private int $for = 0;
19 private int $while = 0;
20 private int $return = 0;
21 private int $as = 0;
22 private int $break = 0;
23 private int $case = 0;
24 private int $continue = 0;
25 private int $null = 0;
26 private int $class = 0;
27 private int $trait = 0;
28 private int $extends = 0;
29 private int $implements = 0;
30 private int $const = 0;
31 private int $private = 0;
32 private int $public = 0;
33 private int $protected = 0;
34 private int $static = 0;
35 private int $new = 0;
36 private int $foreach = 0;
37 private int $list = 0;
38 private int $switch = 0;
39 private int $interface = 0;
40 private int $throw = 0;
41 private int $do = 0;
42 private int $use = 0;
43 private int $try = 0;
44 private int $catch = 0;
45 private int $default = 0;
46 private int $instanceof = 0;
47 private int $attribute = 0;
48 private int $enum = 0;
49 private int $abstract = 0;
50 private int $final = 0;
51 private int $yield = 0;
52 private int $children = 0;
53 private int $category = 0;
54 private int $clone = 0;
55 private int $parent = 0;
56 private int $self = 0;
57 private int $require_once = 0;
58 private int $echo = 0;
59 private int $print = 0;
60 private int $type = 0;
61 private int $newtype = 0;
63 public function foo() {
64 $this->if = 10;
65 $this->else = 10;
66 $this->function = 10;
67 $this->true = 10;
68 $this->false = 10;
69 $this->for = 10;
70 $this->while = 10;
71 $this->return = 10;
72 $this->as = 10;
73 $this->break = 10;
74 $this->case = 10;
75 $this->continue = 10;
76 $this->null = 10;
77 $this->class = 10;
78 $this->trait = 10;
79 $this->extends = 10;
80 $this->implements = 10;
81 $this->const = 10;
82 $this->private = 10;
83 $this->public = 10;
84 $this->protected = 10;
85 $this->static = 10;
86 $this->new = 10;
87 $this->foreach = 10;
88 $this->list = 10;
89 $this->switch = 10;
90 $this->interface = 10;
91 $this->throw = 10;
92 $this->do = 10;
93 $this->use = 10;
94 $this->try = 10;
95 $this->catch = 10;
96 $this->default = 10;
97 $this->instanceof = 10;
98 $this->attribute = 10;
99 $this->enum = 10;
100 $this->abstract = 10;
101 $this->final = 10;
102 $this->yield = 10;
103 $this->children = 10;
104 $this->category = 10;
105 $this->clone = 10;
106 $this->parent = 10;
107 $this->self = 10;
108 $this->require_once = 10;
109 $this->echo = 10;
110 $this->print = 10;
111 $this->type = 10;
112 $this->newtype = 10;