Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return an undefined Pos for an empty ObjectList #410

Merged
merged 2 commits into from
Oct 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
formatting
  • Loading branch information
sgmiller committed Oct 15, 2020
commit f6b4bdc86722bee50d5b0605c1cc372af5cc0303
2 changes: 1 addition & 1 deletion hcl/ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (o *ObjectList) Elem() *ObjectList {
func (o *ObjectList) Pos() token.Pos {
// If an Object has no members, it won't have a first item
// to use as position
if len(o.Items)==0 {
if len(o.Items) == 0 {
return unknownPos
}
// Return the uninitialized position
Expand Down