mirror of
https://github.com/golang/go
synced 2024-11-19 00:44:40 -07:00
b31dda8a2a
`types.Types[types.TINTER]` is already used for `interface{}`, so we can conveniently just extend the existing logic that substitutes `byte` and `rune` with `uint8` and `int32` to also substitute `any`. Fixes #49665. Change-Id: I1ab1954699934150aab899b35037d5611c8ca47e Reviewed-on: https://go-review.googlesource.com/c/go/+/365354 Trust: Matthew Dempsky <mdempsky@google.com> Trust: Dan Scales <danscales@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dan Scales <danscales@google.com>
19 lines
330 B
Go
19 lines
330 B
Go
// run
|
|
|
|
// Copyright 2021 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
|
|
|
|
import "fmt"
|
|
|
|
var x any
|
|
var y interface{}
|
|
|
|
var _ = &x == &y // assert x and y have identical types
|
|
|
|
func main() {
|
|
fmt.Printf("%T\n%T\n", &x, &y)
|
|
}
|