You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classA {
finalint foo;
constA(this.foo);
}
voidf(x) {
if (x case {0:A(1)}) {}
}
Here A(1) is a pattern, and we have to say A(foo: 1) to make it a valid object pattern. Alternatively we can use const A(1). I'm not sure what was your intention in this test though.