mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: require -lang=go1.14 for overlapping interfaces
Support for overlapping interfaces is a new (proposed) Go language feature to be supported in Go 1.14, so it shouldn't be supported under -lang=go1.13 or earlier. Fixes #34329. Change-Id: I5fea5716b7d135476980bc40b4f6e8c611b67735 Reviewed-on: https://go-review.googlesource.com/c/go/+/195678 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
c2facbe937
commit
7f907b9cee
3 changed files with 16 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ func expandiface(t *types.Type) {
|
|||
switch prev := seen[m.Sym]; {
|
||||
case prev == nil:
|
||||
seen[m.Sym] = m
|
||||
case !explicit && types.Identical(m.Type, prev.Type):
|
||||
case langSupported(1, 14) && !explicit && types.Identical(m.Type, prev.Type):
|
||||
return
|
||||
default:
|
||||
yyerrorl(m.Pos, "duplicate method %s", m.Sym.Name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue