Re: Reiterate total pattern accepting null in switch

2021-09-07 Thread Tagir Valeev
Hello! > case Object! o: // binding, no null > case Object? o: // binding, null > default: // no binding, no null > null, default:// no binding, null > > So the first thought experiment I am asking you to do is whether, in > this world, you would feel significa

Re: Reiterate total pattern accepting null in switch

2021-09-06 Thread Remi Forax
- Original Message - > From: "Brian Goetz" > To: "Tagir Valeev" , "amber-spec-experts" > > Sent: Lundi 6 Septembre 2021 15:46:19 > Subject: Re: Reiterate total pattern accepting null in switch > On 9/6/2021 5:12 AM, Tagir Valeev wrot

Re: Reiterate total pattern accepting null in switch

2021-09-06 Thread Brian Goetz
On 9/6/2021 5:12 AM, Tagir Valeev wrote: Hello! Now, as we develop support in IntelliJ, we have a little bit of experience with patterns in switches. So far, the thing I dislike the most is that the total pattern matches null in the switch. I shared my concerns before and now they are basical

Reiterate total pattern accepting null in switch

2021-09-06 Thread Tagir Valeev
Hello! Now, as we develop support in IntelliJ, we have a little bit of experience with patterns in switches. So far, the thing I dislike the most is that the total pattern matches null in the switch. I shared my concerns before and now they are basically the same, probably even stronger. Note that