2022-04-04 01:07:36 -06:00
|
|
|
// 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 p
|
|
|
|
|
2022-12-01 18:24:23 -07:00
|
|
|
type Any any
|
2023-05-16 13:46:33 -06:00
|
|
|
type IntOrBool interface{ int | bool }
|
2022-12-01 18:24:23 -07:00
|
|
|
|
2023-05-16 13:46:33 -06:00
|
|
|
type I interface{ Any | IntOrBool }
|
2022-04-04 12:40:44 -06:00
|
|
|
|
|
|
|
var (
|
|
|
|
X I = 42
|
|
|
|
Y I = "xxx"
|
|
|
|
Z I = true
|
|
|
|
)
|
2023-05-16 13:46:33 -06:00
|
|
|
|
|
|
|
type A interface{ *B | int }
|
|
|
|
type B interface{ A | any }
|