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
If only the enumeration type itself is imported but not its variants, a match expression reports unreachable pattern instead of unrecognised type:
pubmod inner {pubenumE{E1,E2}}pubmod foo {use inner::E;// change this to use inner::{E, E1, E2} then all will be finepubfnbar(e:E) -> int{match e {E1 => 0,E2 => 1// error: unreachable pattern}}}pubfnmain(){}
Is this something intentional? Or should we give it a more sensible error message?