opaque types should provide proper constraints on their type params
[hiphop-php.git] / hphp / hack / test / typecheck / constraints / tapply_is_newtype.php
blob232de4721c1033bf96fbe5519c9ec8cdcc2e6407
1 //// file1.php
2 <?hh // strict
4 interface Constraint<T as num> {}
6 newtype NewConstraint<T as num> as Constraint<T> = Constraint<T>;
8 //// file2.php
9 <?hh // strict
11 // Test that we check constraints for the 'as' part of newtypes
12 function invalid(NewConstraint<mixed> $x): void {}