Skip to content

Commit 4eee6ef

Browse files
committed
Handle system.object missing base type
1 parent 97cd006 commit 4eee6ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ protected override void ExtractInitializers(TextWriter trapFile)
4747
var baseType = Symbol.ContainingType.BaseType;
4848
if (baseType is null)
4949
{
50-
Context.ModelError(Symbol, "Unable to resolve base type in implicit constructor initializer");
50+
if (Symbol.ContainingType.SpecialType != SpecialType.System_Object)
51+
{
52+
Context.ModelError(Symbol, "Unable to resolve base type in implicit constructor initializer");
53+
}
5154
return;
5255
}
5356

0 commit comments

Comments
 (0)