Skip to content

Commit eb7356d

Browse files
authored
Update utils.go
Fixes breakage caused by #1434
1 parent c3aa0b7 commit eb7356d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/utils.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,9 @@ func GetTypes(t Expr) []string {
8383
// IsMultiLine returns whether an Expr is multiline or not.
8484
func IsMultiLine(param Expr) bool {
8585
start, end := param.Span()
86+
if end.Line == 0 && end.Byte == 0 && end.LineRune == 0 {
87+
// If the end position is unknown, we assume it's single line (for backwards compatibility).
88+
return false
89+
}
8690
return start.Line != end.Line
8791
}

0 commit comments

Comments
 (0)