Using call syntax with an Enum has two possibilities:
creating a new enum from a previous enum (good for inheriting behavior, etc.)
looking up a member in a final enum
Which should be used is determined by the number of arguments: one means lookup, more than one means creation. However, if the enum was created using multiple values, and the lookup call erroneously passes multiple values instead of one tuple with those multiple values, then the creation branch is chosen and the resulting error message is less than useful.
Which branch to take should be determined by whether the enum is final (has members).
…9500)
* use final status to determine lookup or create
* 📜🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
ethanfurman commentedMay 10, 2022
•
edited by bedevere-bot
Using call syntax with an Enum has two possibilities:
Which should be used is determined by the number of arguments: one means lookup, more than one means creation. However, if the enum was created using multiple values, and the lookup call erroneously passes multiple values instead of one tuple with those multiple values, then the creation branch is chosen and the resulting error message is less than useful.
Which branch to take should be determined by whether the enum is final (has members).
Linked PRs
Linked PRs
Linked PRs
The text was updated successfully, but these errors were encountered: