3 * Copyright (c) 2014, Facebook, Inc.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
11 interface GenReadApi
<Tk
, +Tv
> {}
13 class GenReadApiClass
<Tk
, +Tv
> implements GenReadApi
<Tk
, Tv
> {
14 public function __construct(private Tv
$v) {}
18 public static function make
<Tk
>(): GenReadApi
<Tk
, mixed> {
19 return new GenReadApiClass(null);
23 final class Bar
extends Foo
{
24 public static function make
<Tk
>(): GenReadApi
<Tk
, this
> {
25 return new GenReadApiClass(new static());
29 interface GenReadIdxApi
<Tk
, +Tv
> {}
31 class GenReadIdxApiClass
<Tk
, +Tv
> implements GenReadIdxApi
<Tk
, Tv
> {
32 public function __construct(private Tv
$v) {}
36 public static function make
<Tk
>(): GenReadIdxApi
<Tk
, mixed> {
37 return new GenReadIdxApiClass(null);
41 <<__ConsistentConstruct
>>
42 class BarIdx
extends FooIdx
{
43 public static function make
<Tk
>(): GenReadIdxApi
<Tk
, this
> {
44 return new GenReadIdxApiClass(new static());