🐛 Bug
//# publish
module 0xa::test {
fun require_key<T: key + drop>(_x: T) { }
fun bad() {
require_key(|| 1u64);
}
}
Compiling this gives:
bug: bytecode verification failed with unexpected status code `CALL_TYPE_MISMATCH_ERROR`:
Error message: none
┌─ .../sources/test.move:6:9
│
6 │ require_key(|| 1u64);
│ ^^^^^^^^^^^^^^^^^^^^
│
Analysis from Claude Code
In third_party/move/move-model/src/ty.rs:
default_type_for applies key to Fun type without guard
Constraint::join lacks SomeFunctionValue + HasAbilities({key}) rejection
🐛 Bug
Compiling this gives:
Analysis from Claude Code
In
third_party/move/move-model/src/ty.rs:default_type_forapplieskeytoFuntype without guardConstraint::joinlacksSomeFunctionValue + HasAbilities({key})rejection