-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
From walk.go:
func walkcompareString(n *Node, init *Nodes) *Node {
// s + "badgerbadgerbadger" == "badgerbadgerbadger"
if (n.Op == OEQ || n.Op == ONE) && Isconst(n.Right, CTSTR) && n.Left.Op == OADDSTR && n.Left.List.Len() == 2 && Isconst(n.Left.List.Second(), CTSTR) && strlit(n.Right) == strlit(n.Left.List.Second()) {
r := nod(n.Op, nod(OLEN, n.Left.List.First(), nil), nodintconst(0))
return finishcompare(n, r, init)
}
// cont...
I've always been skeptical that anyone writes code that matches this pattern; I'd like to remove it.
Thoughts/objections?
komuw and bradfitzericlagergrencristaloleg
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.