-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add "enum" construct #1958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add "enum" construct #1958
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
0a48911
Fix mal-formatting.
odersky 669c5a8
Add enum syntax
odersky ca039ba
Don't pass docstring as a parameter.
odersky fe14afb
Simplify syntax
odersky 5c53f53
Allow value expansion of modules in mergeCompanionDefs
odersky 69fd9dc
Adapt generic tests to model modified enum values scheme
odersky 41d83d4
Change handling of enum defs.
odersky cea243a
Implement enum desugaring
odersky c279057
Add tests
odersky b4ece2a
Comment out unused method in Context
odersky db387a2
Improvement to REPL test
odersky 3ea9831
Fix "closest" computation for docstrings
odersky adf9009
Make `getDocComment` referentially transparent
felixmulder 2be70e6
Another test
odersky 7a7db73
Link generic test to actual implementations of Enum and EnumValues
odersky a5345a3
Be more systematic about result of apply method
odersky d3b2c37
New test case
odersky 8f3c9a8
Fix typo
odersky c245600
More fine-grained distinctions when flags are defined.
odersky cb3e536
Fix cheeky comment in nested scope
felixmulder 1196533
Fix typo in syntax
odersky a30e7ec
Check that cases with type parameters also have an extends clause
odersky c58555e
Don't change the return type of the `copy` method
odersky 4bdad3c
Change return type of `apply`.
odersky cf10e28
Change enumeration members.
odersky 91a26b3
Support comma-separated enum constants
odersky 44d9ab8
Support cases with type parameters that extend a non-parameterized base
odersky 62b4eb8
Fix neg test error count
odersky 4c576bf
Avoid assertion failure on neg test
odersky 1c79612
Fix rebase breakage
odersky a46f4f8
Infer enum type args from type parameter bounds
odersky 9b37a7c
New and updated tests
odersky 9938344
Add check file
odersky f702773
Implementation of proposal changes
odersky 9201896
Update test and add check file
odersky 18d0ae5
Another test fixed
odersky 30d8d87
Emit enum utility methods only if enum class is not generic
odersky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may miss some point here, it seems to me the fold is useless here, because
constrVparamss
can only be of size 0?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size 0 or 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size 0 or 1, actually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, thanks, obviously I've some problems with basic math :)