Skip to content

Conversation

ian-twilightcoder
Copy link
Contributor

defaultValueDescription is always the enum case name, but that's not a valid argument when the enum value differs from the case name. Extend ExpressibleByArgument to use rawValue for defaultValueDescription for string enums.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary
…from the case names defaultValueDescription is always the enum case name, but that's not a valid argument when the enum value differs from the case name. Extend ExpressibleByArgument to use rawValue for defaultValueDescription for string enums.
@ian-twilightcoder
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@rauhul rauhul left a comment

Choose a reason for hiding this comment

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

LGTM thanks for adding tests too! Probably should wait for Nate's eyes too before merging.

@rauhul
Copy link
Contributor

rauhul commented Aug 26, 2022

@swift-ci please test

Copy link
Member

@natecook1000 natecook1000 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, @ian-twilightcoder 👏🏻

@natecook1000
Copy link
Member

@swift-ci Please test

@rauhul
Copy link
Contributor

rauhul commented Aug 26, 2022

@swift-ci please test

@rauhul rauhul merged commit 67fa3c0 into apple:main Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants