f39477d926
resolve3 wasn't checking this. Added test cases. Also added a helpful informational message in the case where you have a variable binding that you probably think refers to a variant that you forgot to import. This is easier to do in resolve than in typeck because there's code in typeck that assumes that each of the patterns binds the same number of variables.
8 lines
134 B
Rust
8 lines
134 B
Rust
enum foo { alpha, beta(int) }
|
|
|
|
fn main() {
|
|
alt alpha {
|
|
alpha | beta(i) {} //~ ERROR inconsistent number of bindings
|
|
}
|
|
}
|