- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for F2a (0.09 sec)
-
test/escape_mutations.go
type B struct { x int px *int pb *B } func F1(b *B) { // ERROR "mutates param: b derefs=0" b.x = 1 } func F2(b *B) { // ERROR "mutates param: b derefs=1" *b.px = 1 } func F2a(b *B) { // ERROR "mutates param: b derefs=0" b.px = nil } func F3(b *B) { // ERROR "leaking param: b" fmt.Println(b) // ERROR "\.\.\. argument does not escape" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 18 11:58:37 UTC 2023 - 1.8K bytes - Viewed (0) -
src/internal/types/testdata/examples/functions.go
var _ = variadic[int, float64](1, 2.3, 3.4, 4) // Type inference also works in recursive function calls where // the inferred type is the type parameter of the caller. func f1[T any](x T) { f1(x) } func f2a[T any](x, y T) { f2a(x, y) } func f2b[T any](x, y T) { f2b(y, x) } func g2a[P, Q any](x P, y Q) { g2a(x, y) } func g2b[P, Q any](x P, y Q) { g2b(y, x) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 30 20:19:38 UTC 2023 - 5.5K bytes - Viewed (0) -
test/checkbce.go
useInt(a[i-4]) } } func f2(a [256]int, i uint) { useInt(a[i]) // ERROR "Found IsInBounds$" j := i % 256 useInt(a[j]) j = i & 255 useInt(a[j]) j = i & 17 useInt(a[j]) } func f2a(a [35]int, i uint8) { useInt(a[i]) // ERROR "Found IsInBounds$" j := i & 34 useInt(a[j]) j = i & 17 useInt(a[j]) } func f2b(a [35]int, i uint16) { useInt(a[i]) // ERROR "Found IsInBounds$"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 3.7K bytes - Viewed (0) -
test/writebarrier.go
z := *y // no barrier *x = z // ERROR "write barrier" } func f2(x *interface{}, y interface{}) { *x = y // no barrier (dead store) z := y // no barrier *x = z // ERROR "write barrier" } func f2a(x *interface{}, y *interface{}) { *x = *y // no barrier (dead store) z := y // no barrier *x = z // ERROR "write barrier" } func f3(x *string, y string) { *x = y // no barrier (dead store)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 23 19:46:36 UTC 2021 - 5.9K bytes - Viewed (0)