Skip to content

Commit

Permalink
Merge pull request #682 from hadashiA/ku/refine-generator2
Browse files Browse the repository at this point in the history
Fix generator condition
  • Loading branch information
hadashiA authored Jun 17, 2024
2 parents c4a762b + aad80ce commit 60c3108
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions VContainer.SourceGenerator/Analyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ static class Analyzer
{
return null;
}
if (typeSymbol.IsAbstract || typeSymbol.IsStatic)
if (typeSymbol.IsAbstract || typeSymbol.IsStatic || typeSymbol.SpecialType != SpecialType.None)
{
return null;
}

if (typeSymbol.ContainingModule.Name is "VContainer" or "VContainer.Standalone")
var moduleName = typeSymbol.ContainingModule.Name;
if (moduleName is "VContainer" or "VContainer.Standalone" ||
moduleName.StartsWith("Unity.") ||
moduleName.StartsWith("UnityEngine.") ||
moduleName.StartsWith("System."))
{
return null;
}
Expand Down

0 comments on commit 60c3108

Please sign in to comment.