diff --git a/godot-core/src/builtin/collections/array.rs b/godot-core/src/builtin/collections/array.rs index cdbd5ba5d..111feda91 100644 --- a/godot-core/src/builtin/collections/array.rs +++ b/godot-core/src/builtin/collections/array.rs @@ -1245,8 +1245,9 @@ impl Clone for Array { // Double-check copy's runtime type in Debug mode. if cfg!(debug_assertions) { - copy.with_checked_type() - .expect("copied array should have same type as original array") + copy.with_checked_type().unwrap_or_else(|e| { + panic!("copied array should have same type as original array: {e}") + }) } else { copy }