Skip to content

Commit

Permalink
Fix incorrect setter validation
Browse files Browse the repository at this point in the history
  • Loading branch information
hadashiA committed Dec 23, 2024
1 parent e74d882 commit 1c7cde5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion VContainer.SourceGenerator/Emitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ static bool TryEmitInjectMethod(
// verify property
foreach (var propSymbol in typeMeta.InjectProperties)
{
if (propSymbol.SetMethod == null || !propSymbol.SetMethod.IsInitOnly || !propSymbol.SetMethod.CanBeCallFromInternal())
if (propSymbol.SetMethod == null ||
propSymbol.SetMethod.IsInitOnly ||
!propSymbol.SetMethod.CanBeCallFromInternal())
{
context.ReportDiagnostic(Diagnostic.Create(
DiagnosticDescriptors.PrivatePropertyNotSupported,
Expand Down

0 comments on commit 1c7cde5

Please sign in to comment.