Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / namespace_use.php
blob99b099899d1aa7ce681fd6fa0ed01c08b76a18ab
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 namespace NS1\SubNS1 {
13 class C {}
16 namespace NS2 {
17 use NS1 as X;
18 use NS1\SubNS1, NS1\SubNS1\C as Y;
19 use \NS1\SubNS1 as Z;
21 function f(): void {
22 new \NS1\SubNS1\C();
23 new X\SubNS1\C();
24 new SubNS1\C();
25 new Y();
26 new Z\C();