-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
bugSomething isn't workingSomething isn't workingcompiler-v2stale-exemptPrevents issues from being automatically marked and closed as stalePrevents issues from being automatically marked and closed as stalestarter-task
Description
🐛 Bug
Consider the following code:
module 0xc0ffee::m {
enum X has copy, drop {
A,
B
}
fun test(x: X): u64 {
match ((x, x)) {
(X::A, X::A) => 1,
_ => 2, // note: (_, _) works
}
}
}
This fails compilation with the error message:
error: tuple type `(X, X)` is not allowed as a type argument
┌─ TEMPFILE:10:13
│
10 │ _ => 2,
│ ^
However, we should let the compiler compile this without any errors (because _
is supposed to be a catch all), similar to Rust.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompiler-v2stale-exemptPrevents issues from being automatically marked and closed as stalePrevents issues from being automatically marked and closed as stalestarter-task
Type
Projects
Status
For Grabs