Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dev.go2go] go/go2go: update name of embedded pointer to instantiation
Fixes #39774 Change-Id: Icb2948ae19e06a3766e7edb01ef40de50e7aca7e Reviewed-on: https://go-review.googlesource.com/c/go/+/239702 Reviewed-by: Ian Lance Taylor <iant@golang.org>
- Loading branch information
1 parent
2dc2987
commit fa201df
Showing
2 changed files
with
30 additions
and
1 deletion.
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,20 @@ | ||
// compile | ||
|
||
// Copyright 2020 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 p | ||
|
||
type I interface{} | ||
|
||
type S(type T) struct { | ||
*T | ||
} | ||
|
||
func F() { | ||
v := S(I){} | ||
if v.T != nil { | ||
panic(v) | ||
} | ||
} |