Don't emit an error if multiple overrides add to a list

This commit is contained in:
pietervdvn 2022-07-19 09:46:06 +02:00
parent 47b50e2b94
commit 1f5c594f34

View file

@ -246,6 +246,10 @@ class OverrideShadowingCheck extends DesugaringStep<LayoutConfigJson> {
for (const layer of withOverride) {
for (const key in overrideAll) {
if(key.endsWith("+") || key.startsWith("+")){
// This key will _add_ to the list, not overwrite it - so no warning is needed
continue
}
if (layer["override"][key] !== undefined || layer["override"]["=" + key] !== undefined) {
const w = "The override of layer " + JSON.stringify(layer["builtin"]) + " has a shadowed property: " + key + " is overriden by overrideAll of the theme";
errors.push(w)