Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/internal/gcimporter: simplify unified IR importer
CL 424854 changed the unified IR writer's handling of type declarations to write the underlying type rather than the RHS type expression's type. This in turn allows us to simplify the go/types importer, because now there's no need to delay caling SetUnderlying. Fixes #57015. Change-Id: I80caa61f6cad5b7f9d829939db733a66cfca621c Reviewed-on: https://go-review.googlesource.com/c/go/+/424876 Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
- Loading branch information
Showing
3 changed files
with
56 additions
and
45 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,16 @@ | ||
// 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 issue57015 | ||
|
||
type E error | ||
|
||
type X[T any] struct {} | ||
|
||
func F() X[interface { | ||
E | ||
}] { | ||
panic(0) | ||
} | ||
|
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