Open
Description
I've found myself fairly frequently needing to do pattern matches where I check boolean fields of the object I'm matching against. However, it's substantially more verbose to do that using the pattern matching syntax than a standard boolean expression one might use in an if
/else
: object.isState
becomes Type(isState: true)
. Some of this will be mitigated by #2563, but I suggest also allowing Type(isState)
as a shorthand for Type(isState: true)
. I think special-casing booleans makes sense given that pattern matching is an intrinsically boolean context.