facebook / facebook/hhvm

Either allow literal ints as shape keys, or require class constant shape keys to be strings

Open
#6,035 4 comments 0 reactions 0 assignees View on GitHub
hack
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

``` Hack
class MyClass {
const int FOO = 123;
}

type MyShape = shape(
MyClass::FOO => string, // this is fine
123 => string, // expected string literal or class constant
}
```

Discovered while looking into why Shapes::toArray() returns `array` instead of `array`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.