{"record":{"id":"2bd5e59785b72d76","repo":"bevyengine/bevy","slug":"could-not-add-function-overload-duplicate-found-f","errorCode":null,"errorMessage":"could not add function overload: duplicate found for signature `{0:?}`","messagePattern":"could not add function overload: duplicate found for signature `(.+?)`","errorType":"exception","errorClass":"FunctionOverloadError","httpStatus":null,"severity":"error","filePath":"crates/bevy_reflect/src/func/error.rs","lineNumber":55,"sourceCode":"/// The result of calling a [`DynamicFunction`] or [`DynamicFunctionMut`].\n///\n/// Returns `Ok(value)` if the function was called successfully,\n/// where `value` is the [`Return`] value of the function.\n///\n/// [`DynamicFunction`]: crate::func::DynamicFunction\n/// [`DynamicFunctionMut`]: crate::func::DynamicFunctionMut\npub type FunctionResult<'a> = Result<Return<'a>, FunctionError>;\n\n/// An error that occurs when attempting to add a function overload.\n#[derive(Debug, Error, PartialEq)]\npub enum FunctionOverloadError {\n    /// A [`SignatureInfo`] was expected, but none was found.\n    ///\n    /// [`SignatureInfo`]: crate::func::info::SignatureInfo\n    #[error(\"expected at least one `SignatureInfo` but found none\")]\n    MissingSignature,\n    /// An error that occurs when attempting to add a function overload with a duplicate signature.\n    #[error(\"could not add function overload: duplicate found for signature `{0:?}`\")]\n    DuplicateSignature(ArgumentSignature),\n    /// An attempt was made to add an overload with more than [`ArgCount::MAX_COUNT`] arguments.\n    ///\n    /// [`ArgCount::MAX_COUNT`]: crate::func::args::ArgCount\n    #[error(\n        \"argument signature `{:?}` has too many arguments (max {})\",\n        0,\n        ArgCount::MAX_COUNT\n    )]\n    TooManyArguments(ArgumentSignature),\n}\n\n/// An error that occurs when registering a function into a [`FunctionRegistry`].\n///\n/// [`FunctionRegistry`]: crate::func::FunctionRegistry\n#[derive(Debug, Error, PartialEq)]\npub enum FunctionRegistrationError {\n    /// A function with the given name has already been registered.","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_reflect/src/func/error.rs#L37-L73","documentation":"FunctionOverloadError::DuplicateOverload — an overload with the given argument signature (payload) already exists on the function, so adding it again is rejected. Remove the duplicate registration or use a distinct signature.","triggerScenarios":"Thrown at crates/bevy_reflect/src/func/error.rs:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change one overload's argument types so signatures differ","Remove the duplicate overload before adding a new one"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}