OverridableModuleBase shouldn't embed ModuleBase.
Individual module structs normally embed ModuleBase themselves. This caused duplicate embedding, and so made common properties like notice inaccessible. Bug: 135460391 Test: app_test.go, TreeHugger Change-Id: I5683b194e3de909d480c083a931cc7e871de1d74 Merged-In: I5683b194e3de909d480c083a931cc7e871de1d74
This commit is contained in:
parent
6df90831b7
commit
3ad00bf196
1 changed files with 1 additions and 3 deletions
|
@ -90,8 +90,6 @@ type OverridableModule interface {
|
|||
|
||||
// Base module struct for overridable module types
|
||||
type OverridableModuleBase struct {
|
||||
ModuleBase
|
||||
|
||||
// List of OverrideModules that override this base module
|
||||
overrides []OverrideModule
|
||||
// Used to parallelize registerOverrideMutator executions. Note that only addOverride locks this
|
||||
|
@ -137,7 +135,7 @@ func (b *OverridableModuleBase) override(ctx BaseModuleContext, o OverrideModule
|
|||
// Adds the base module to the overrides property, if exists, of the overriding module. See the
|
||||
// comment on OverridableModuleBase.overridesProperty for details.
|
||||
if b.overridesProperty != nil {
|
||||
*b.overridesProperty = append(*b.overridesProperty, b.Name())
|
||||
*b.overridesProperty = append(*b.overridesProperty, ctx.ModuleName())
|
||||
}
|
||||
for _, p := range b.overridableProperties {
|
||||
for _, op := range o.getOverridingProperties() {
|
||||
|
|
Loading…
Reference in a new issue