err msg
This commit is contained in:
parent
06ed41ecae
commit
ffdb5121f4
3 changed files with 3 additions and 3 deletions
|
|
@ -3841,7 +3841,7 @@ z: {
|
||||||
...${x}
|
...${x}
|
||||||
c
|
c
|
||||||
}
|
}
|
||||||
`, `d2/testdata/d2compiler/TestCompile2/vars/errors/spread-non-map.d2:6:3: cannot spread non-composite into composite`)
|
`, `d2/testdata/d2compiler/TestCompile2/vars/errors/spread-non-map.d2:6:3: cannot spread non-composite`)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ func (c *compiler) resolveSubstitutions(varsStack []*Map, node Node) {
|
||||||
}
|
}
|
||||||
if box.Substitution.Spread {
|
if box.Substitution.Spread {
|
||||||
if resolvedField.Composite == nil {
|
if resolvedField.Composite == nil {
|
||||||
c.errorf(box.Substitution, "cannot spread non-composite into composite")
|
c.errorf(box.Substitution, "cannot spread non-composite")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
switch n := node.(type) {
|
switch n := node.(type) {
|
||||||
|
|
|
||||||
2
testdata/d2compiler/TestCompile2/vars/errors/spread-non-map.exp.json
generated
vendored
2
testdata/d2compiler/TestCompile2/vars/errors/spread-non-map.exp.json
generated
vendored
|
|
@ -4,7 +4,7 @@
|
||||||
"errs": [
|
"errs": [
|
||||||
{
|
{
|
||||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/errors/spread-non-map.d2,5:2:26-5:9:33",
|
"range": "d2/testdata/d2compiler/TestCompile2/vars/errors/spread-non-map.d2,5:2:26-5:9:33",
|
||||||
"errmsg": "d2/testdata/d2compiler/TestCompile2/vars/errors/spread-non-map.d2:6:3: cannot spread non-composite into composite"
|
"errmsg": "d2/testdata/d2compiler/TestCompile2/vars/errors/spread-non-map.d2:6:3: cannot spread non-composite"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue