addrs: PartialExpandedModule.String correct for entirely-unexpanded

This logic was previously incorrect for any case where the number of
expanded steps was zero, causing the string representation to begin with
a dot when it ought not to.
pull/34312/head
Martin Atkins 3 years ago
parent d2b911ef98
commit 908c5fa44f

@ -155,7 +155,7 @@ func (pem PartialExpandedModule) String() string {
buf.WriteString(pem.expandedPrefix.String())
}
for i, callName := range pem.unexpandedSuffix {
if i > 0 || len(pem.unexpandedSuffix) != 0 {
if i > 0 || len(pem.expandedPrefix) != 0 {
buf.WriteByte('.')
}
buf.WriteString("module.")

Loading…
Cancel
Save