New inference: improved error message for unresolved type
[hiphop-php.git] / hphp / hack / test / typecheck / typing_fail_uninstantiable_in_shape_return.php
blobbd065cd2e8f934704d85e4b721744b2bed507642
1 <?hh // strict
2 /**
3 * Copyright (c) 2018, 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.
9 */
11 abstract final class CannotBeInstantiated {}
12 class TestFoo {
14 const type TData = shape('text' => CannotBeInstantiated);
15 // this type can never be satisfied
16 public function foo(this::TData $c): void {}