Disallow ... without type in function typehints
[hiphop-php.git] / hphp / hack / test / typecheck / fake_members4.php
blob57c27c355558fede8a8e3efb5d72e54d80a8e721
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 function do_something(): void {
15 class X {
16 private ?int $x;
18 public function getX(): int {
19 if($this->x === null) {
20 $this->x = 0;
22 do_something();
23 hh_show($this->x);
24 return $this->x;