From: Alberto Donizetti Date: Sat, 30 Jan 2016 21:01:00 +0000 (+0100) Subject: regexp: remove unreachable code X-Git-Tag: go1.7beta1~1767 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=cd41db34bcd1776a783fb7507b68705a7de4e54a;p=gostls13.git regexp: remove unreachable code Found running go vet on the package. It barks that regexp/backtrack.go:257: unreachable code regexp/backtrack.go:302: unreachable code For #11041 Change-Id: I0f5ba0d6183108fba3d144991b826273db0ffb09 Reviewed-on: https://go-review.googlesource.com/19824 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/regexp/backtrack.go b/src/regexp/backtrack.go index fd95604fe4..3a1100dde8 100644 --- a/src/regexp/backtrack.go +++ b/src/regexp/backtrack.go @@ -254,7 +254,6 @@ func (m *machine) tryBacktrack(b *bitState, i input, pc uint32, pos int) bool { } panic("bad arg in InstCapture") - continue case syntax.InstEmptyWidth: if syntax.EmptyOp(inst.Arg)&^i.context(pos) != 0 { @@ -299,7 +298,6 @@ func (m *machine) tryBacktrack(b *bitState, i input, pc uint32, pos int) bool { // Otherwise, continue on in hope of a longer match. continue } - panic("unreachable") } return m.matched