-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[patterns] Fix a handful of small-ish patterns issues: (#2779)
* [patterns] Fix a handful of small-ish patterns issues: - Allow object pattern fields to tear off methods. - No exception for non-exhaustive switch statements that don't need to be exhaustive. - Promoted types and bounds can be always-exhaustive. - Fix incorrect static error with cast patterns in assignments. - Clarify that patterns are not const contexts. Fix #2561. Fix #2698. Fix #2765. Fix #2758. * Tweak wording in a few places.
- Loading branch information
1 parent
65411e9
commit f71713e
Showing
1 changed file
with
72 additions
and
40 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
In the above example, I would probably do
Your issue is mostly "how do I differentiate from a non nullable var to a nullable var?". You don't, I guess. You could use
Object s
.