Disallow ... without type in function typehints
[hiphop-php.git] / hphp / hack / test / typecheck / test_inter7.php
blobba42f1284a7ef5966535608c3800fde082c3d6d7
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 interface I {}
13 class A implements I {
14 public function get(): void {}
16 class B implements I {
17 public function get(): void {}
19 class Z {}
21 function bar(): void {
22 $x = true ? new A() : new B();
23 $x->get();