RX0092

Domain: Parsing

Error message

a key that repeats its receiver: %s (%s)

In the message, %s marks a value that the engine fills in when it raises the error.

The story

You wrote a key that says nothing new, and the engine noticed. Here is the principle: a key exists to tell you what its value is. It adds information. But if the key just repeats the name of the thing that is already receiving the value, it adds nothing. Look at x equals a map with the key x set to one. The receiver is x, and the key is also x. The reader learns nothing from the second x. The same happens with a builtin that takes one argument: length with the key value is just noise, because the row already says it receives a value. So the engine refuses at parse and shows you the repeated key. Notice what stays perfectly fine. A key that carries real information, like grams on a Banana, is welcome. And a bare argument, like length of a quoted word, is fine too. The fix is easy. Either remove the key, or choose a key that actually says something about the value. Say it once, say it usefully.

Text from the Rush engine's error catalogue.