Repository navigation
Conversation
| - The only exceptions to this rule are the unary ``-`` (minus) and unary ``+`` (plus) for ints: types | ||
| like ``Literal[-5]`` and ``Literal[+1]`` are *accepted*. |
There was a problem hiding this comment.
This isn't mentioned anywhere else in the spec, so it should stay (or moved elsewhere)
| - Arbitrary expressions like ``Literal[3 + 4]`` or | ||
| ``Literal["foo".replace("o", "b")]``. |
There was a problem hiding this comment.
The conformance test quotes this, so I'm not sure if getting rid of it like is wise:
There was a problem hiding this comment.
If we indeed decide to remove the entire illegal parameterizations subsection as you propose here, then this should should also be updated
There was a problem hiding this comment.
The "at type check time" here only makes sense because of the removed runtime subsection
Remove redundant illegal-parameter and runtime sections while preserving restrictions on valid Literal parameters.
|
@jorenham Thanks for the review! I've made the suggested changes and pushed them. Kept the exceptions for unary + and -, along with the restriction on arbitrary expressions, while simplifying the section. |
Summary
Removes redundant sections from the Literal specification to improve clarity and conciseness.
Specifically:
Related issue
Closes #2355