Repository navigation
Conversation
The DropInGenerator turned the type's Accessibility into the C# keyword with ToLower(), which uses the current culture. On a machine with the Turkish or Azerbaijani culture "Internal" became "ınternal", and a [ZLinqDropInExtension] on an internal type produced code that failed to compile (CS1585). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DropInGeneratorbuilds the class modifier fromextension.Accessibility.ToString().ToLower().ToLower()uses the current culture, and in the Turkish and Azerbaijani cultures"I".ToLower()is"ı"(dotless i). Source generators run inside the compiler with the build machine's culture, so on such a machine a[ZLinqDropInExtension]on aninternaltype generateswhich fails with CS1585.
ProtectedAndInternal/ProtectedOrInternalare affected the same way.The fix uses
ToLowerInvariant(); other cultures get the same output as before.How I checked it (there is no generator test project, so I used the sandbox): on a Windows machine with the
tr-TRculture,dotnet build sandbox/ConsoleAppfails with CS1585 inZLinq.DropIn.GlobalListVIExtensions.g.cs(itsGlobalListVIisinternal), and the emitted file starts withınternal. With the change it builds and the file starts withinternal.The change was found and written with Claude Code (AI assistance); I reviewed and verified it.
🤖 Generated with Claude Code