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
Source-gen infers generic type arguments from a data source's declared type, so broad declared types fail constraints that the runtime value meets #7116
When a generic test method's data source is declared with a broad static type, source-generation mode infers the type argument from the declared type rather than from the runtime value. If that declared type does not satisfy the method's constraint, the test is dropped (or, once #7102 lands, reported as a constraint failure). Reflection mode infers from the runtime value, so the same test runs and passes.
Possible directions: make source-gen defer inference to the runtime value when the declared type is not exact (a non-sealed class, object or Nullable<T>), or document that source-gen infers from declared types and keep the analyzer error.
Activity
test: cover mixed-arity and unconvertible [GenerateGenericTest] rows (#…
fix(generic): explain declared-type inference for broad data source t…