You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like the correct output should either be nothing (if it is associated with _ = x), or f: "trailing comment in f\n".
What's currently happening is that the "_ = x" in func f is the most recent "important" node when we encounter the comment. Since the comment isn't on the line immediately following "_ = x", it doesn't
get associated with it. We don't look further up the "important nodes" stack to notice that it's within the bounds of f. Instead, we just give up and associate it with g.
Working example: https://play.golang.org/p/TlsDxVbGow
Prints:
g: "trailing comment in f\n"
Seems like the correct output should either be nothing (if it is associated with
_ = x
), orf: "trailing comment in f\n"
.What's currently happening is that the "_ = x" in func f is the most recent "important" node when we encounter the comment. Since the comment isn't on the line immediately following "_ = x", it doesn't
get associated with it. We don't look further up the "important nodes" stack to notice that it's within the bounds of f. Instead, we just give up and associate it with g.
/cc @griesemer
The text was updated successfully, but these errors were encountered: