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,23 @@
// 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 a0
type Builder[T any] struct{}
func (r Builder[T]) New1() T {
var v T
return v
}
func (r Builder[T]) New2() T {
var v T
return v
}
type IntBuilder struct{}
func (b IntBuilder) New() int {
return Builder[int]{}.New2()
}

View File

@@ -0,0 +1,11 @@
// 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 a1
import "./a0"
func New() int {
return a0.IntBuilder{}.New()
}

View File

@@ -0,0 +1,11 @@
// 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 a2
import "./a0"
func New() int {
return a0.Builder[int]{}.New1()
}

View File

@@ -0,0 +1,22 @@
// 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 (
"fmt"
"./a1"
"./a2"
)
func New() int {
return a1.New() + a2.New()
}
func main() {
if got, want := New(), 0; got != want {
panic(fmt.Sprintf("got %d, want %d", got, want))
}
}