Open sjrd opened 1 year ago
OMG, I didn't even know this syntax was possible
{ type Value }
is implicitly AnyRef { type Value}
. It's a valid type. Then we create another refinement of that type, so { type Value } { type Value = A }
is (AnyRef { type Value }) { type Value = A }
. There's nothing surprising if you follow the grammar.
Refine the definition of
EnumerationUtil.Aux
to make it comply with the legal match types of SIP-56. Although weird, it is the "standard" trick for extracting enumeration Value's uner SIP-56.Refine the result type of
EnumerationReader.findEnumValue
to be path-dependent instead of using the match type. It is strictly more precise.Ref https://github.com/scala/improvement-proposals/pull/65, https://github.com/lampepfl/dotty/pull/18262