relax the constraint on enum class base type
[hiphop-php.git] / hphp / hack / test / enum_class / typing / typing4.bad.php
blob7df5a3087e99ec600b3859f4a0388c3b3e5c9fe8
1 <?hh
2 // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
3 <<file: __EnableUnstableFeatures('enum_class')>>
5 interface ExBox {}
7 class Box<T> implements ExBox {
8 public function __construct(public T $data) {}
11 // only types without free parameters are allowed
12 enum class E : Box<T> {
13 A<Box<string>>(new Box('zuck'));