The compiler panics with an ICE in typing/translate.rs:2601 when an or-pattern (|) combines variants from different enum types.
MRE:
module 0x0::MRE {
public enum A has drop {
X,
}
public enum B has drop {
Y,
}
fun f(a: A): u64 {
match (a) {
A::X | B::Y => 1,
}
}
}
Reproduce steps:
cd external-crates/move
cargo +nightly run --release -p move-compiler --bin move-check -- mre/mre_typing_translate_2601.move
Output:
thread '<unnamed>' panicked at crates/move-compiler/src/typing/translate.rs:2601:32:
ICE unresolved error join, failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expected behavior: a type error diagnostic about incompatible types in or-pattern arms.
Git commit: 1a27af4
Build: release
cargo 1.91.0-nightly (840b83a10 2025-07-30)
rustc 1.91.0-nightly (3672a55b7 2025-08-13)