This commit is contained in:
Alexander Wang 2023-02-21 20:26:20 -08:00
parent 264ce21d60
commit 6dee552e1a
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
3 changed files with 0 additions and 27 deletions

View file

@ -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 {

View file

@ -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: {

View file

@ -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\""
}
]
}
}