From 561fcfbcd094c2b61bf507164cb62aac091b1b10 Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Sat, 9 May 2026 17:36:16 +0300 Subject: [PATCH] refactor(materials): drop Type-instance forwarding for state traits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the `required_state_variables(::Type{<:AbstractMaterial})` shim that instantiated materials just to query traits; callers should pass instances or specialize on concrete types directly. - Delete the default `required_state_variables(::Type{T}) = …` definition from `traits.jl`. --- src/materials/traits.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/materials/traits.jl b/src/materials/traits.jl index 9881979..1c3e5d5 100644 --- a/src/materials/traits.jl +++ b/src/materials/traits.jl @@ -42,9 +42,6 @@ Returns tuple of state variable types required by this material. """ function required_state_variables end -# Type-level dispatch for required_state_variables (for @generated functions) -required_state_variables(::Type{T}) where {T<:AbstractMaterial} = required_state_variables(T()) - # ============================================================================ # MATERIAL-SPECIFIC TRAIT IMPLEMENTATIONS # ============================================================================