mirror of
https://github.com/golang/go
synced 2024-11-25 12:47:56 -07:00
efa9efe8e4
If n.Type==nil after typechecking, then we should have already reported a more useful error somewhere else. Just return 0 in evalunsafe without trying to do anything else that's likely to cause problems. Also, further split out issue7525.go into more test files, because cmd/compile reports at most one typechecking loop per compilation unit. Fixes #22351. Change-Id: I3ebf505f72c48fcbfef5ec915606224406026597 Reviewed-on: https://go-review.googlesource.com/72251 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Robert Griesemer <gri@golang.org>
12 lines
268 B
Go
12 lines
268 B
Go
// errorcheck
|
|
|
|
// Copyright 2017 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
import "unsafe"
|
|
|
|
const _ = uint64(unsafe.Offsetof(T{}.F)) // ERROR "undefined"
|