- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 68 for iface (0.17 sec)
-
test/escape_field.go
var x X // BAD: &i should not escape x.p1 = &i var iface interface{} = x // ERROR "x does not escape" x1 := iface.(X) sink = x1.p2 } func field17() { i := 0 // ERROR "moved to heap: i$" var x X x.p1 = &i var iface interface{} = x // ERROR "x does not escape" x1 := iface.(X) sink = x1.p1 } func field18() { i := 0 // ERROR "moved to heap: i$"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Sep 12 08:31:49 UTC 2020 - 2.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/roundtrip_test.go
} var iface interface{} if err := modePair.dec.Unmarshal(cborFromOriginal, &iface); err != nil { t.Fatalf("unexpected error from Unmarshal into %T: %v", &iface, err) } cborFromIface, err := modePair.enc.Marshal(iface) if err != nil { t.Fatalf("unexpected error from Marshal of iface: %v", err) } { // interface{} to interface{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 21:48:12 UTC 2024 - 7.1K bytes - Viewed (0) -
src/main/java/jcifs/dcerpc/DcerpcBinding.java
Registered: Wed Jun 12 15:45:55 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 4.5K bytes - Viewed (0) -
src/internal/types/testdata/check/decls1.go
t21 int = a /* ERRORx `cannot use .* variable declaration` */ ) // Various more complex expressions var ( u1 = x /* ERROR "not an interface" */ .(int) u2 = iface.([]int) u3 = iface.(a /* ERROR "not a type" */ ) u4, ok = iface.(int) u5, ok2, ok3 = iface /* ERROR "assignment mismatch" */ .(int) ) // Constant expression initializations var ( v1 = 1 /* ERROR "mismatched types untyped int and untyped string" */ + "foo"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 05 18:13:11 UTC 2024 - 3.8K bytes - Viewed (0) -
test/fixedbugs/bug514.go
*myInt } var val = 1234 var valNotInHeap = notInHeap{i: val} func main() { i := val check(i) mi := myInt{f: &valNotInHeap} check(mi.Get()) ifv := iface(mi) check(ifv.Get()) ifv = iface(&mi) check(ifv.Get()) em := embed{&mi} check(em.Get()) ifv = em check(ifv.Get()) ifv = &em check(ifv.Get()) } func check(v int) { if v != val { panic(v) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 15:27:18 UTC 2022 - 782 bytes - Viewed (0) -
test/fixedbugs/issue5056.go
// issue 5056: escape analysis not applied to wrapper functions package main type Foo int16 func (f Foo) Esc() *int{ x := int(f) return &x } type iface interface { Esc() *int } var bar, foobar *int func main() { var quux iface var x Foo quux = x bar = quux.Esc() foobar = quux.Esc() if bar == foobar { panic("bar == foobar") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 517 bytes - Viewed (0) -
src/go/internal/srcimporter/srcimporter_test.go
if level > 10 { t.Errorf("%s: embeds itself", named) return } iface, _ := named.Underlying().(*types.Interface) if iface == nil { return // not an interface } // check explicitly declared methods for i := 0; i < iface.NumExplicitMethods(); i++ { m := iface.ExplicitMethod(i) recv := m.Type().(*types.Signature).Recv() if recv == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 6.5K bytes - Viewed (0) -
test/fixedbugs/issue42727.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 20 17:31:50 UTC 2020 - 400 bytes - Viewed (0) -
pilot/pkg/util/network/ip.go
func GetPrivateIPsIfAvailable() ([]string, bool) { ok := true ipAddresses := make([]string, 0) ifaces, _ := net.Interfaces() for _, iface := range ifaces { if iface.Flags&net.FlagUp == 0 { continue // interface down } if iface.Flags&net.FlagLoopback != 0 { continue // loopback interface } addrs, _ := iface.Addrs() for _, addr := range addrs { var ip net.IP switch v := addr.(type) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Dec 21 21:27:21 UTC 2023 - 6.3K bytes - Viewed (0) -
platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/reflect/TypesTest.groovy
then: 0 * _ } class Base { @Incubating Object doSomething() { null } } interface Iface {} class Child extends Base implements Serializable, Iface { @Nullable Object doSomething() { null } } def "walking type hierarchy happens breadth-first"() { def visitor = Mock(Types.TypeVisitor)
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Dec 06 15:03:49 UTC 2023 - 2.1K bytes - Viewed (0)