Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / trait_typehint.php
blobaafaeeb3f5e82419de35605a3424aa8042b2592c
1 <?hh
3 interface IParent {
4 const CBAR = 'bar';
7 abstract class CParent implements IParent {
8 protected function foo(): string {
9 return __CLASS__;
13 abstract class Kid extends CParent {
14 protected function bar() {}
17 trait KidTrait {
18 require extends Kid;
19 require extends CParent;
21 protected function foo(): string {
22 takes_parent($this);
23 takes_iparent($this);
24 takes_kid($this);
25 takes_kt($this);
26 parent::bar();
27 return 'wrapped('.parent::foo().')';
31 function takes_kt(Vector<KidTrait> $kt): void {}