Skip to content

Treat '...' like missing() in AST#276

Merged
MichaelChirico merged 5 commits intomainfrom
possible_fix_275
Mar 5, 2026
Merged

Treat '...' like missing() in AST#276
MichaelChirico merged 5 commits intomainfrom
possible_fix_275

Conversation

@hcirellu
Copy link
Copy Markdown
Collaborator

@hcirellu hcirellu commented Mar 5, 2026

This should fix #275.

I added a special handling for symbol ... in [.integer64.

The example in the related issue is added to the tests.

Closes #275

@hcirellu hcirellu marked this pull request as ready for review March 5, 2026 20:16
@hcirellu hcirellu requested a review from MichaelChirico March 5, 2026 20:17
Copy link
Copy Markdown
Collaborator

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another test case I had in mind is a helper passing ... something like

getter = function(x, ...) x[...]

calling that directly and with lapply should work

@hcirellu
Copy link
Copy Markdown
Collaborator Author

hcirellu commented Mar 5, 2026

another test case I had in mind is a helper passing ... something like

getter = function(x, ...) x[...]

calling that directly and with lapply should work

This works now:

getter = function(x, ...) x[...]
getter(integer64())
# integer64(0)
getter(integer64(), "sss")
# integer64(0)
lapply(integer64(), getter)
# list()
lapply(integer64(1), getter)
# [[1]]
# integer64
# [1] 0
lapply(integer(), getter)
# list()
lapply(integer(1), getter)
# [[1]]
# [1] 0

@MichaelChirico
Copy link
Copy Markdown
Collaborator

Great! Let's add it to the test suite

Comment thread R/integer64.R Outdated
Comment thread R/integer64.R Outdated
Comment thread R/integer64.R Outdated
@MichaelChirico MichaelChirico changed the title possible_fix_275 Treat '...' like missing() in AST Mar 5, 2026
Copy link
Copy Markdown
Collaborator

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MichaelChirico MichaelChirico merged commit e2ba87a into main Mar 5, 2026
8 checks passed
@MichaelChirico MichaelChirico deleted the possible_fix_275 branch March 5, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revdep failure: Rdiagnosislist

2 participants