mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
NullPropagationTransform rewrote `c != null ? c.AccessChain : default` to `c?.AccessChain ?? default` whenever the access-chain result was a non-nullable value type. For a by-ref-like type (a ref struct such as Span<T>) that form does not compile: a ref struct cannot be wrapped in Nullable<T> (CS8978). Exclude by-ref-like return types from the null-coalescing rewrite. Assisted-by: Copilot:claude-opus-4.8:GitHub Copilot CLIpull/3823/head
2 changed files with 38 additions and 2 deletions
Loading…
Reference in new issue