We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b764b0 commit d5ee93dCopy full SHA for d5ee93d
csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/Type.cs
@@ -31,10 +31,13 @@ public static bool ConstructedOrParentIsConstructed(INamedTypeSymbol symbol)
31
/// <param name="symbol">Type symbol</param>
32
private bool IsBrokenType(ITypeSymbol symbol)
33
{
34
- if (!Context.ExtractionContext.IsStandalone || !symbol.FromSource())
+ if (!Context.ExtractionContext.IsStandalone ||
35
+ !symbol.FromSource() ||
36
+ symbol.IsAnonymousType)
37
38
return false;
39
}
40
+
41
// (1) public class { ... } is a broken type and doesn't have a name.
42
// (2) public class var { ... } is a an allowed type, but it overrides the var keyword for all uses.
43
// It is probably a better heuristic to treat it as a broken type.
0 commit comments