We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f061860 commit bd236a9Copy full SHA for bd236a9
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