Either allow literal ints as shape keys, or require class constant shape keys to be strings
Open
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
Assessment
This issue has not been assessed yet.