diff --git a/src/template/Template.cc b/src/template/Template.cc index b0f3459c4f..3887018c0d 100644 --- a/src/template/Template.cc +++ b/src/template/Template.cc @@ -742,10 +742,17 @@ bool Template::check_restricted(string& ra, const Template* base, } else { + // +---------+--------+--------------------+ + // | current | base | outcome | + // +---------+--------+--------------------+ + // | YES | YES/NO | Error if different | + // | NO | YES | Add to current | + // | NO | NO | Nop | + // +---------+--------+--------------------+ + string ra_b; + if ( get(rit->first, ra) ) { - string ra_b; - base->get(rit->first, ra_b); if ( ra_b != ra ) @@ -754,6 +761,10 @@ bool Template::check_restricted(string& ra, const Template* base, return true; } } + else if ( base->get(rit->first, ra_b) ) + { + add(rit->first, ra_b); + } } }