nvm on 1
This commit is contained in:
parent
264ce21d60
commit
6dee552e1a
3 changed files with 0 additions and 27 deletions
|
|
@ -612,13 +612,6 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) {
|
|||
}
|
||||
}
|
||||
|
||||
if keyword == "top" && obj.Attributes.Left == nil {
|
||||
c.errorf(f.LastPrimaryKey(), `keyword "top" currently cannot be set without also setting "left"`)
|
||||
}
|
||||
if keyword == "left" && obj.Attributes.Top == nil {
|
||||
c.errorf(f.LastPrimaryKey(), `keyword "left" currently cannot be set without also setting "top"`)
|
||||
}
|
||||
|
||||
switch f.Name {
|
||||
case "style":
|
||||
if obj.Attributes.Style.ThreeDee != nil {
|
||||
|
|
|
|||
|
|
@ -124,14 +124,6 @@ x: {
|
|||
tassert.Equal(t, "200", g.Objects[0].Attributes.Top.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "positions_disjoint",
|
||||
text: `hey: {
|
||||
top: 200
|
||||
}
|
||||
`,
|
||||
expErr: `d2/testdata/d2compiler/TestCompile/positions_disjoint.d2:2:2: keyword "top" currently cannot be set without also setting "left"`,
|
||||
},
|
||||
{
|
||||
name: "positions_negative",
|
||||
text: `hey: {
|
||||
|
|
|
|||
12
testdata/d2compiler/TestCompile/positions_disjoint.exp.json
generated
vendored
12
testdata/d2compiler/TestCompile/positions_disjoint.exp.json
generated
vendored
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"graph": null,
|
||||
"err": {
|
||||
"ioerr": null,
|
||||
"errs": [
|
||||
{
|
||||
"range": "d2/testdata/d2compiler/TestCompile/positions_disjoint.d2,1:1:8-1:9:16",
|
||||
"errmsg": "d2/testdata/d2compiler/TestCompile/positions_disjoint.d2:2:2: keyword \"top\" currently cannot be set without also setting \"left\""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue