-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow NewType subclassing NewType. (#3465)
Use case: type hierarchy of IDs, all of which are integers at runtime, but we want to type-check distinctions between e.g. "id of User" and "id of Media", while still allowing some functions to take "any ID" (which is still a more specific type than "any integer").
- Loading branch information
1 parent
166d54d
commit 8c989bf
Showing
2 changed files
with
23 additions
and
13 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