Skip to content

Commit

Permalink
fix bad import syntax edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
alixander committed Feb 5, 2024
1 parent 0214358 commit 528baad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion d2ir/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func (c *compiler) pushImportStack(imp *d2ast.Import) (string, bool) {
impPath := imp.PathWithPre()
if impPath == "" && imp.Range.Path != "" {
if impPath == "" && imp.Range != (d2ast.Range{}) {
c.errorf(imp, "imports must specify a path to import")
return "", false
}
Expand Down

0 comments on commit 528baad

Please sign in to comment.