Set fields in CreateModule to match current module
When a mutator calls CreateModule, set the blueprints file and line number to the values of the module that the mutator was visiting. Change-Id: I4526f14a744be944e42582bc46f11a9a7b502f03
This commit is contained in:
parent
c63f1fd784
commit
1fa1a14853
1 changed files with 3 additions and 0 deletions
|
@ -745,6 +745,9 @@ func (mctx *mutatorContext) Rename(name string) {
|
|||
func (mctx *mutatorContext) CreateModule(factory ModuleFactory, props ...interface{}) {
|
||||
module := mctx.context.newModule(factory)
|
||||
|
||||
module.relBlueprintsFile = mctx.module.relBlueprintsFile
|
||||
module.pos = mctx.module.pos
|
||||
|
||||
for _, p := range props {
|
||||
err := proptools.AppendMatchingProperties(module.properties, p, nil)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue