fluent.js
fluent.js copied to clipboard
MessageReference as Selector is invalid
https://github.com/projectfluent/fluent.js/blob/5fb64c577ac43e05a14b937a3a006f604a763b42/fluent/test/primitives_test.js#L138
Shouldn't this be invalid because MessageReference cannot be used as Selector?
It should be, yes. A Term Attribute reference would be OK, though.
https://github.com/projectfluent/fluent/blob/c480d01cf68a5f3afae613ad7243588b486023f8/syntax/abstract.mjs#L60-L61
The fluent runtime package takes shortcuts when parsing and resolving to avoid the perf cost of being 100% correct. There shouldn't be any tests which rely on this behavior; what you found is a bug in the test, thanks for finding it.