Skip to content

Fix nullable object initializer widening - #2754

Merged
DavidObando merged 1 commit into
mainfrom
fix/2743-nullable-object-widening
Jul 22, 2026
Merged

Fix nullable object initializer widening#2754
DavidObando merged 1 commit into
mainfrom
fix/2743-nullable-object-widening

Conversation

@DavidObando

Copy link
Copy Markdown
Owner

Summary

  • preserve the nullable substitution from constructed indexer properties when translating indexed collection initializers
  • avoid spurious runtime !! assertions for nullable references widened into object? while retaining assertions for object/other required sinks
  • cover nullable references, conditional access, generics, dictionary/collection forms, negative strict sinks, and migrated runtime behavior

Validation

Deferred work

  • RC-C13 findings unrelated to nullable initializer widening (compiler metadata/ABI, ILVerify observability, and other isolated roots) remain tracked separately and are intentionally unchanged.

Fixes #2743

@DavidObando
DavidObando merged commit 9f9d237 into main Jul 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cs2gs: nullable reference widened to object? initializer element gets spurious !!

1 participant