You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sv: give struct and union types a declaration identity for class specializations #1963
Class specializations are keyed by a spelling of the bound parameter types. A packed struct or union type carries its structure but no declaration identity, so two separately declared but identical types would give one key:
typedef structpacked{ int x; }A;
typedef structpacked{ int x; }B;
classC#(typeT= int); static int count; endclass// C#(A) and C#(B) are different specializations (IEEE 1800-2023 6.22.1, 8.25)
To avoid silently sharing static properties and handle identity between such specializations, #1796 rejects struct and union types as class type parameter values, as it already does for enumeration types (each enum declaration is a type of its own, 6.19).
Expected
Give aggregate (and enum) types a declaration identity that survives typedef aliasing (typedef A A2; names the same type as A), use it in the specialization key, and lift the rejection.
Activity
feat(sv): accept named enumeration and struct class type arguments
feat(sv): accept named enumeration and struct class type arguments