forked from golang/go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/compile: fix assert condition in generic method call
Fixes golang#53406. Change-Id: If7ae39ec1042a792d82a0a2de96d168c22d8ab71 Reviewed-on: https://go-review.googlesource.com/c/go/+/412614 Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Alex Rakoczy <[email protected]> Auto-Submit: Alex Rakoczy <[email protected]> Reviewed-by: Keith Randall <[email protected]> Run-TryBot: Wayne Zuo <[email protected]>
- Loading branch information
1 parent
6bad7e8
commit 4045b1b
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// compile | ||
|
||
// Copyright 2022 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 | ||
|
||
func main() { | ||
f[int]() | ||
} | ||
|
||
func f[T1 any]() { | ||
var x Outer[T1, int] | ||
x.M() | ||
} | ||
|
||
type Outer[T1, T2 any] struct{ Inner[T2] } | ||
|
||
type Inner[_ any] int | ||
|
||
func (Inner[_]) M() {} |