1
0
mirror of https://github.com/golang/go synced 2024-11-05 20:36:10 -07:00
go/test/fixedbugs/issue15926.go
Ian Lance Taylor 6901b08482 cmd/link: avoid name collision with DWARF .def suffix
Adding a .def suffix for DWARF info collided with the DWARF info,
without the suffix, for a method named def. Change the suffix to ..def
instead.

Fixes #15926.

Change-Id: If1bf1bcb5dff1d7f7b79f78e3f7a3bbfcd2201bb
Reviewed-on: https://go-review.googlesource.com/23733
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-06-03 16:56:29 +00:00

21 lines
389 B
Go

// build
// Copyright 2016 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.
// Issue 15926: linker was adding .def to the end of symbols, causing
// a name collision with a method actually named def.
package main
type S struct{}
func (s S) def() {}
var I = S.def
func main() {
I(S{})
}