- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for Gooer2 (0.11 sec)
-
test/typeparam/issue48049.go
package main func main() { Gooer2[byte]() } type Fooer[T any] interface { Foo(p T) } type fooer1[T any] struct{} func (fooer1[T]) Foo(T) {} type fooer2[T any] struct { r []Fooer[T] } //go:noinline func (mr fooer2[T]) Foo(p T) { mr.r[0] = fooer1[T]{} return } func Gooer2[T any]() Fooer[T] { return fooer2[T]{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 493 bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue47747.go
// func (b *Bar[t]) Bar(l t) { *b = Bar[t](l) } // // func _[t any](f Fooer1[t]) t { // var b Bar[t] // f.Foo(&b) // return t(b) // } // Test case 2 from issue // For now, a lone type parameter is not permitted as RHS in a type declaration (issue #45639). // type Fooer2[t any] interface { // Foo() // } // // type Foo2[t any] t // // func (f *Foo2[t]) Foo() {} //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 1.7K bytes - Viewed (0) -
src/testing/newcover.go
if mode == "" { return } cover2.mode = mode cover2.tearDown = tearDown cover2.snapshotcov = snapcov } // coverReport2 invokes a callback in _testmain.go that will // emit coverage data at the point where test execution is complete, // for "go test -cover" runs. func coverReport2() { if !goexperiment.CoverageRedesign { panic("unexpected") } if errmsg, err := cover2.tearDown(*coverProfile, *gocoverdir); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 09:58:07 UTC 2024 - 1.6K bytes - Viewed (0) -
test/typeparam/typeswitch5.out
fooer 6 other other
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 09 18:41:45 UTC 2021 - 41 bytes - Viewed (0) -
test/fixedbugs/issue8385.go
// is called without a receiver. package main type Fooer interface { Foo(i, j int) } func f(x int) { } type I interface { M(int) } type T struct{} func (t T) M(x int) { } func g() func(int) func main() { Fooer.Foo(5, 6) // ERROR "not enough arguments in call to method expression Fooer.Foo|incompatible type|not enough arguments" var i I var t *T
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 15 02:35:59 UTC 2020 - 1.2K bytes - Viewed (0) -
test/fixedbugs/issue45258.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jul 28 21:41:07 UTC 2021 - 397 bytes - Viewed (0) -
test/typeparam/issue51522a.go
var t T if i != t { println("FAIL: if i != t") } } type myint int func (m myint) foo() { } type fooer interface { foo() } type comparableFoo interface { comparable foo() } func g[T comparableFoo](i fooer) { var t T if i != t { println("FAIL: if i != t") } } func main() { f[int](int(0)) g[myint](myint(0))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 10 18:50:50 UTC 2022 - 543 bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue48974.go
// license that can be found in the LICENSE file. package p type Fooer interface { Foo() } type Fooable[F /* ERROR "instantiation cycle" */ Fooer] struct { ptr F } func (f *Fooable[F]) Adapter() *Fooable[*FooerImpl[F]] { return &Fooable[*FooerImpl[F]]{&FooerImpl[F]{}} } type FooerImpl[F Fooer] struct { }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:25 UTC 2023 - 457 bytes - Viewed (0) -
test/fixedbugs/issue29612.dir/p2/ssa/ssa.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 01 17:27:06 UTC 2019 - 453 bytes - Viewed (0) -
src/cmd/compile/internal/test/issue50182_test.go
} } // Test that escape analysis correctly tracks escaping inside of methods // called on generic types. type fooer interface { foo() } type P struct { p *int q int } var esc []*int func (p P) foo() { esc = append(esc, p.p) // foo escapes the pointer from inside of p } func f[T fooer](t T) { t.foo() } func TestGenericEscape(t *testing.T) { for i := 0; i < 4; i++ { var x int = 77 + i
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 13 23:35:37 UTC 2022 - 1.2K bytes - Viewed (0)