Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty tuple piracy #214

Merged
merged 3 commits into from
Feb 5, 2021
Merged

Fix empty tuple piracy #214

merged 3 commits into from
Feb 5, 2021

Conversation

kleinschmidt
Copy link
Member

Fixes #213

The type aliases for tuples of terms used NTuple which included empty
tuples. This changes those aliases to use Tuple{T, Vararg{T}} instead, which
enforces that there's at least one T (AbstractTerm etc.) in the tuple.

@ararslan ararslan merged commit 0d0c2bb into master Feb 5, 2021
@ararslan ararslan deleted the dfk/empty-tuple branch February 5, 2021 17:29
@NHDaly
Copy link

NHDaly commented Feb 5, 2021

Awesome, thanks! 🎉

Do note that this means that your other pirated functions, like () + (), will no longer work. You might find that users were relying on this without realizing it if they had some tuples constructed dynamically and they end up empty?

Something to keep an eye on. 👍 Thanks!

@kleinschmidt
Copy link
Member Author

I certainly look forward to those bug reports, if only to find out what kind of strange use cases people have come up with :)

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.

StatsModels is incorrectly type pirating show() for empty tuples, breaking tuple display
4 participants