No error on use of `unsafe_cast`
[hiphop-php.git] / hphp / hack / test / typecheck / constraint_gen_fail2.php
blobf79435b909e3b2a8ca686bc67f9da973706c009b
1 <?hh // strict
2 /**
3 * Copyright (c) 2014, Facebook, Inc.
4 * All rights reserved.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
12 interface A {
13 public function render(): string;
16 function foo<T as A>(T $x): void {
17 $x->render();
20 function test(): void {
21 foo('test');