Error on self::class on non final classes
[hiphop-php.git] / hphp / hack / test / typecheck / tuple_as_constant.php
blobf48381440b7cf18b706c90dc69195934ca3930ae
1 <?hh // strict
2 // Copyright 2004-present Facebook. All Rights Reserved.
4 class A {
5 const (int, string, vec<string>) MY_TUPLE = tuple(0, "foo", vec["b", "bc"]);
7 public function return_int(): int {
8 return self::MY_TUPLE[0];
11 public function return_string(): string {
12 return self::MY_TUPLE[1];
15 public function return_wrong(): dict<string, int> {
16 return self::MY_TUPLE[2];