Patterns spec says nothing about the case when class contains a getter named _ (or, at least, I didn't find it in the spec). What should we expect in the following case?
class C {
int get _ => 42;
}
main() {
C c = C();
switch (c) {
case C(:var _): print(_);
}
}
Did we declare here a variable named _ and the programm will print 42? Or _ is always a wildcard and print(_) is a compile time error?