{"record":{"id":"eb943b644a79e0c6","repo":"slint-ui/slint","slug":"invalid-property-type-for","errorCode":null,"errorMessage":"Invalid property type for {}::{}","messagePattern":"Invalid property type for (.+?)::(.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/compiler/generator/rust_live_preview.rs","lineNumber":149,"sourceCode":"            let caller_ident = accessor_names::rust_accessor_ident(name, AccessorKind::Invoker);\n            property_and_callback_accessors.push(quote!(\n                #[allow(dead_code)]\n                pub fn #caller_ident(&self, #(#args_name : #callback_args,)*) -> #return_type {\n                    self.0.borrow().invoke(#prop_name, &[#(#args_name.into(),)*])\n                        .try_into().unwrap_or_else(|_| panic!(\"Invalid return type for function {}::{}\", #component_name, #prop_name))\n                }\n            ));\n        } else {\n            let rust_property_type = rust_primitive_type(&p.ty).unwrap();\n            let convert_to_value = convert_to_value_fn(&p.ty);\n            let convert_from_value = convert_from_value_fn(&p.ty);\n\n            let getter_ident = accessor_names::rust_accessor_ident(name, AccessorKind::Getter);\n            property_and_callback_accessors.push(quote!(\n                #[allow(dead_code)]\n                pub fn #getter_ident(&self) -> #rust_property_type {\n                    #convert_from_value(self.0.borrow().get_property(#prop_name))\n                        .unwrap_or_else(|_| panic!(\"Invalid property type for {}::{}\", #component_name, #prop_name))\n                }\n            ));\n\n            let setter_ident = accessor_names::rust_accessor_ident(name, AccessorKind::Setter);\n            if !p.read_only() {\n                property_and_callback_accessors.push(quote!(\n                    #[allow(dead_code)]\n                    pub fn #setter_ident(&self, value: #rust_property_type) {\n                        self.0.borrow().set_property(#prop_name, #convert_to_value(value))\n                    }\n                ));\n            } else {\n                property_and_callback_accessors.push(quote!(\n                    #[allow(dead_code)] fn #setter_ident(&self, _read_only_property : ()) { }\n                ));\n            }\n        }\n    }","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/internal/compiler/generator/rust_live_preview.rs#L131-L167","documentation":"Error \"Invalid property type for {}::{}\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/compiler/generator/rust_live_preview.rs:149 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the Rust property type matches the property type declared in the .slint file.","Reload the component after changing property types."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}