Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util-app: improve c.t.a.Flag usage by providing a 'letParse' method
Problem If a `Flag` is used in a manner that results in type erasure (i.e. contained within a collection of `Flag`), there is no way of using a `Flag.let` without knowing the `Flag`'s `T` type. Solution Introduce a `letParse` method, which will use the underlying `flaggable` to parse and `let` using the correct type associated with the `Flag`. Result Users of Flags can now call `letParse` without needing to explicitly know or reference the Flag's `T: Flaggable` type. JIRA Issues: CSL-7824 Differential Revision: https://phabricator.twitter.biz/D288549
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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