Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / test_darray_varray_consts.php
blobe8b45cfc34387e2e9d02fe66cfcbc9a008fcedf4
1 <?hh // strict
2 // Copyright 2004-present Facebook. All Rights Reserved.
4 class A {
5 const darray<string, string> FOO = darray['foo' => 'bar'];
6 const varray<varray<string>> BAR = varray[varray['foo']];
7 const varray<dict<string, vec<string>>>
8 BAZ = varray[dict['foo' => vec['bar']]];
10 // Should not typecheck
11 public function test(): string {
12 return self::FOO;