Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git] / hphp / hack / test / typecheck / trait_require_inherit.php
blobb5260dc095a42aab7031be78b70ab18e34d79e0e
1 <?hh
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the BSD-style license found in the
7 * LICENSE file in the "hack" directory of this source tree. An additional grant
8 * of patent rights can be found in the PATENTS file in the same directory.
12 interface IParent {
13 const FOO = 'bar';
15 public abstract function whatevs();
18 abstract class ParentClass implements IParent {
19 protected function bar() {}
22 abstract class Kid extends ParentClass {
25 class Grandkid extends Kid {
26 use KidTrait;
28 public function whatevs() {}
31 trait KidTrait {
32 require extends Kid;
34 protected function foo() {
35 $this->bar().self::FOO.$this->whatevs();
39 trait KidTraitChild {
40 use KidTrait;
42 protected function another_foo() {
43 $this->bar().self::FOO.$this->whatevs();