Commit 55ff407
committed
cmd/internal/obj: print error on duplicate symbol definitions
When compiling a package, when there are duplicated symbols
(probably due to a bug in the compiler), we try to print the
source locations of the two definitions. However, if one has its
Func().Text unset, it panics. Guard it with a nil check, so at
least it can print the function name.
Change-Id: I7a851970edc71dc2c8c9d694174bac42ea9c75d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/775623
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Bypass: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>1 parent e49b534 commit 55ff407
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
| |||
0 commit comments