-
-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: access SumType value by index, not type
Previously, code that already knew the desired index was forced to compute a type to pass to get!T or memberName!T, just for get!T or memberName!T to turn that type back into an index. Removing this unnecessary round trip simplifies the code. Additionally, since memberName is no longer dependent on SumType.Types, it can be moved to module scope, and its instantiations can be shared across different SumType instances.
- Loading branch information
Showing
1 changed file
with
43 additions
and
50 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