mirror of
https://github.com/golang/go
synced 2024-11-19 00:34:40 -07:00
91abe4be0e
For -G=3 for test using 'any'. Change-Id: Ia37ee944a38be4f4330e62ad187f10f2d42e41bd Reviewed-on: https://go-review.googlesource.com/c/go/+/365839 Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
19 lines
344 B
Go
19 lines
344 B
Go
// run -gcflags=-G=3
|
|
|
|
// 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)
|
|
}
|