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
Only patterns having the same type should be allowed to be grouped:
enum A<T> {
X : A<Bool>;
Y : A<Int>;
Z : A<Int>;
}
class Test {
static function foo<T>( a : A<T> ) : T {
return switch( a ) {
case X,Y: false; // should not be allowed
case Z: 0; // we should still be allowed to have Y,Z
}
}
static function main() {
trace([foo(X),foo(Y),foo(Z)]);
}
}
The text was updated successfully, but these errors were encountered:
Only patterns having the same type should be allowed to be grouped:
The text was updated successfully, but these errors were encountered: