Handle system.object missing base type

This commit is contained in:
Tamas Vajk
2021-05-31 11:33:59 +02:00
parent 97cd006b2c
commit 4eee6ef1d9

View File

@@ -47,7 +47,10 @@ namespace Semmle.Extraction.CSharp.Entities
var baseType = Symbol.ContainingType.BaseType;
if (baseType is null)
{
Context.ModelError(Symbol, "Unable to resolve base type in implicit constructor initializer");
if (Symbol.ContainingType.SpecialType != SpecialType.System_Object)
{
Context.ModelError(Symbol, "Unable to resolve base type in implicit constructor initializer");
}
return;
}