Initial commit: Go 1.23 release state

This commit is contained in:
Vorapol Rinsatitnon
2024-09-21 23:49:08 +10:00
commit 17cd57a668
13231 changed files with 3114330 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
// 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 a
// Type I is the first basic test for the issue, which relates to a type that is recursive
// via a type constraint. (In this test, I -> IConstraint -> MyStruct -> I.)
type JsonRaw []byte
type MyStruct struct {
x *I[JsonRaw]
}
type IConstraint interface {
JsonRaw | MyStruct
}
type I[T IConstraint] struct {
}

View File

@@ -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 main
import (
"./a"
"fmt"
)
func main() {
var x a.I[a.JsonRaw]
fmt.Printf("%v\n", x)
}