merge previous bindings constantViolations and path onto new bindings constantViolations
This commit is contained in:
parent
7fade101be
commit
2d0355b3b9
@ -1,5 +1,5 @@
|
||||
export default class Binding {
|
||||
constructor({ identifier, scope, path, kind }) {
|
||||
constructor({ existing, identifier, scope, path, kind }) {
|
||||
this.constantViolations = [];
|
||||
this.constant = true;
|
||||
|
||||
@ -12,6 +12,13 @@ export default class Binding {
|
||||
this.kind = kind;
|
||||
|
||||
this.clearValue();
|
||||
|
||||
if (existing) {
|
||||
this.constantViolations = this.constantViolations.concat(
|
||||
existing.path,
|
||||
existing.constantViolations
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -508,6 +508,7 @@ export default class Scope {
|
||||
|
||||
this.bindings[name] = new Binding({
|
||||
identifier: id,
|
||||
existing: local,
|
||||
scope: this,
|
||||
path: path,
|
||||
kind: kind
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user