Can't use enums from other files in map constants
hayes opened this issue · comments
Michael Hayes commented
The following produces an error, but should be valid:
keys.thrift
namespace js example
enum Keys {
foo = 1,
bar = 2,
}
map.thrift
namespace js example
include './keys.thrift'
const map<keys.Keys, string> MyMap = {
keys.Keys.foo: "foo",
keys.Keys.bar: "bar",
}
Error: Unable to resolve value of identifier[keys.Keys.foo]
Daniel Tiziani commented
Any change to get this PR merged? I'm facing the same issue here:
(node:88856) UnhandledPromiseRejectionWarning: Error: Unable to resolve identifier[FeeType] in xxx/xxx/xxx
Anthony commented
Same problem here, why this PR is not yet merged after two years ?
Michael Hayes commented
🤷 I know a couple of other small things got addressed since I put this up, but the repo has been pretty in-active for a while. We ended up creating a fork at Airbnb since there were several issues we couldn't get any progress on (I don't work there anymore).
Nick Iodice commented
Also curious about the feasibility of merging this in.