Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
append(nil, 1)is still accepted without diagnostics on main76becf1ccb5d440a183bbba1e07fa1ea4b3da91d, although Go rejects it because its first argument has no slice type. The nil-element cases from this issue are already covered by the #3518 guard on main.Reject an untyped nil first argument with HYB-E2005, including parenthesized literals, an empty append tail, and a variadic tail. Keep typed zero-valued slices, nilable elements, and a user-defined function named
appendaccepted. Add regression coverage and the required language/decision notes.Validation on Rust/Cargo 1.99.0 and Go 1.26.9, Linux ARM64:
append(nil, 1)returnsAcceptwith zero diagnostics. Both new tests pass after the fix; the existing [soundness] hy-check: builtin delete and append accept untyped nil for non-nilable key and element types (Row 13 BUILDABLE) #3518 suite passes 4/4.git diff --checkpass.The differential run uses a temporary directory inside the checkout: the sandbox exposes an empty
/tmp/.gitthat otherwise breaks Go's VCS stamping. Tests and compiler behavior are unchanged by this environment adjustment. Hosted GitHub Actions and maintainer review are pending.Issue: #2745
Closes #2745
AI assistance: implementation, regression coverage and local validation were prepared with Codex; no human validation is claimed.