compiler: don't try to get backend representation of redefinition
compiler: don't try to get backend representation of redefinition

Trying to get the backend representation of a redefined name can cause a
compiler crash as the compiler can walk over the same statements a
second time.  It's also quite unlikely to produce any additional useful
error messages for the user.

Test case follows.  I'm not going to bother adding this test case to the
testsuite--crash-on-invalid cases are worth fixing but not worth
continually retesting.

package p

type A []int

func (a A) Sum() (sum int) {
	for _, v := range a {
		sum += v
	}
	return sum
}

type A []int

func (a A) Sum() (sum int) {
	for _, v := range a {
		sum += v
	}
	return sum
}

Change-Id: I39107f7df05e48f025a70f75bdd27b7addf842e4
Reviewed-on: https://go-review.googlesource.com/30976
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

golang/gofrontend,golang/gofrontend,golang/gofrontend,golang/gofrontend