Fix "Inherits" nodes being resolved as objects during linting

This commit is contained in:
abcdefg30
2022-06-22 16:57:23 +02:00
committed by Paul Chote
parent 5fe166dfd3
commit 185bef39b0

View File

@@ -64,9 +64,11 @@ namespace OpenRA.Mods.Common.Lint
var traitName = NormalizeName(t.Key);
// Inherits can never define children
if (traitName == "Inherits" && t.Value.Nodes.Count > 0)
if (traitName == "Inherits")
{
emitError($"{t.Location} defines child nodes, which are not valid for Inherits.");
if (t.Value.Nodes.Count > 0)
emitError($"{t.Location} defines child nodes, which are not valid for Inherits.");
continue;
}