Skip to content

Fix compiler warnings CS0108 and CS8604#178

Merged
hadashiA merged 2 commits intomasterfrom
fix/compiler-warnings
Mar 10, 2026
Merged

Fix compiler warnings CS0108 and CS8604#178
hadashiA merged 2 commits intomasterfrom
fix/compiler-warnings

Conversation

@hadashiA
Copy link
Copy Markdown
Owner

Summary

  • Fix CS0108 warning: generated __RegisterVYamlFormatter() in derived types now uses new modifier when base type has [YamlObject]
  • Fix CS8604 warning: add null-forgiving operator in CSharpSyntaxHelper.cs (copied from dotnet/runtime)

Changes

  • VYaml.SourceGenerator/Emitter.cs — Check if base type has [YamlObject] and emit new modifier accordingly
  • VYaml.SourceGenerator/Shims/CSharpSyntaxHelper.cscontainer! to suppress nullable warning

Test plan

  • All tests pass
  • dotnet build produces zero CS warnings

🤖 Generated with Claude Code

hadashiA and others added 2 commits March 10, 2026 12:22
- CS0108: Emit 'new' modifier on __RegisterVYamlFormatter() when base
  type has [YamlObject], avoiding "hides inherited member" warning
- CS8604: Add null-forgiving operator for container in CSharpSyntaxHelper

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CS8604: Add null-forgiving on ArraySegment.Array in ByteArrayFormatter
- CS8714: Use non-nullable key type for Dictionary in PrimitiveObjectFormatter
- CS8620: Use nullable string value type in EnumAsStringFormatter to match compat shim

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hadashiA hadashiA merged commit c8196fb into master Mar 10, 2026
1 check 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.

1 participant