Repository navigation
Conversation
Why:
`@as` accepts float and bigint literals, but the error for any other
payload listed only strings, integers, booleans, null and undefined.
The untagged variants spec, which quotes the message, now matches it,
and its rule 6 table gives the wording printed for arrays and tuples.
Diagnostic modified (invalid @as payload):
Example:
type t = | @as(foo) A | B
Before (diagnostic):
A variant case annotation @as(...) must be a string, integer, boolean, null, or undefined.
After (diagnostic):
A variant case annotation @as(...) must be a string, integer, float, bigint, boolean, null, or undefined.
Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xk6AeCYpCK4SZRtHYKHGoe
Semantic Diff1 commit · Full page List float and bigint in the error for an invalid
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8987 |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #8973.
runtime_tag_of_parsetreeaccepts float and bigint@aspayloads (@as(1.5),@as(12n)), but the error for any other payload left them out:compiler/ml/UntaggedVariants.mdquotes the message, so it is updated too. In the same document, the rule 6 table now notes that for arrays and tuples the code prints "an array or tuple type" rather than "a C type".Tests
The snapshot of
UntaggedInvalidVariantAsAnnotation.resis updated.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xk6AeCYpCK4SZRtHYKHGoe