remove dead code

This commit is contained in:
Alexander Wang 2023-07-13 08:36:28 -07:00
parent ef11d47fc8
commit 06ed41ecae
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE

View file

@ -308,12 +308,6 @@ func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
ScopeAST: scopeAST, ScopeAST: scopeAST,
}) })
case n.Substitution != nil: case n.Substitution != nil:
if !n.Substitution.Spread {
// TODO parser parses ${x} as a field with name "$" and map of child x
// So this is never reached. But that parser behavior could change
c.errorf(n.Substitution, "invalid non-spread substitution in map")
continue
}
// placeholder field to be resolved at the end // placeholder field to be resolved at the end
f := &Field{ f := &Field{
parent: dst, parent: dst,