mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
ensure Value; breaking test for {a={b...}} = c
This commit is contained in:
@@ -3288,8 +3288,12 @@
|
||||
var base1, index, j, len1, nestedProperties, nestedSource, nestedSourceDefault, p, prop, restElements, restIndex;
|
||||
restElements = [];
|
||||
restIndex = void 0;
|
||||
if (source.properties == null) {
|
||||
source = new Value(source);
|
||||
}
|
||||
for (index = j = 0, len1 = properties.length; j < len1; index = ++j) {
|
||||
prop = properties[index];
|
||||
nestedSourceDefault = nestedSource = nestedProperties = null;
|
||||
setScopeVar(prop.unwrap());
|
||||
if (prop instanceof Assign) {
|
||||
if (typeof (base1 = prop.value).isObject === "function" ? base1.isObject() : void 0) {
|
||||
@@ -3301,13 +3305,9 @@
|
||||
[prop.value.value, nestedSourceDefault] = prop.value.value.cache(o);
|
||||
}
|
||||
if (nestedProperties) {
|
||||
if (source.properties) {
|
||||
nestedSource = new Value(source.base, source.properties.concat([new Access(getPropKey(prop))]));
|
||||
if (nestedSourceDefault) {
|
||||
nestedSource = new Value(new Op('?', nestedSource, nestedSourceDefault));
|
||||
}
|
||||
} else {
|
||||
nestedSource = source;
|
||||
nestedSource = new Value(source.base, source.properties.concat([new Access(getPropKey(prop))]));
|
||||
if (nestedSourceDefault) {
|
||||
nestedSource = new Value(new Op('?', nestedSource, nestedSourceDefault));
|
||||
}
|
||||
restElements.push(...traverseRest(nestedProperties, nestedSource));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user