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 d821b35 commit 38e0b5dCopy full SHA for 38e0b5d
src/runtime/typemanager.cs
@@ -390,6 +390,12 @@ static PyTuple GetBaseTypeTuple(Type clrType)
390
{
391
throw new InvalidOperationException("At least one base type must be specified");
392
}
393
+ var nonBases = bases.Where(@base => !@base.Flags.HasFlag(TypeFlags.BaseType)).ToList();
394
+ if (nonBases.Count > 0)
395
+ {
396
+ throw new InvalidProgramException("The specified Python type(s) can not be inherited from: "
397
+ + string.Join(", ", nonBases));
398
+ }
399
400
return new PyTuple(bases);
401
0 commit comments