Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for ToInterface (0.11 sec)

  1. src/internal/reflectlite/export_test.go

    		return Value{t, unsafe_New(t), fl | flagIndir}
    	}
    	return Value{t, nil, fl}
    }
    
    // ToInterface returns v's current value as an interface{}.
    // It is equivalent to:
    //
    //	var i interface{} = (v's underlying value)
    //
    // It panics if the Value was obtained by accessing
    // unexported struct fields.
    func ToInterface(v Value) (i any) {
    	return valueInterface(v)
    }
    
    type EmbedWithUnexpMeth struct{}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. src/internal/reflectlite/all_test.go

    	. "internal/reflectlite"
    	"math"
    	"reflect"
    	"runtime"
    	"testing"
    	"unsafe"
    )
    
    func ToValue(v Value) reflect.Value {
    	return reflect.ValueOf(ToInterface(v))
    }
    
    func TypeString(t Type) string {
    	return fmt.Sprintf("%T", ToInterface(Zero(t)))
    }
    
    type integer int
    type T struct {
    	a int
    	b float64
    	c string
    	d *int
    }
    
    type pair struct {
    	i any
    	s string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 19:26:08 UTC 2023
    - 24.2K bytes
    - Viewed (0)
  3. src/internal/reflectlite/tostring_test.go

    	"reflect"
    	"strconv"
    )
    
    // valueToString returns a textual representation of the reflection value val.
    // For debugging only.
    func valueToString(v Value) string {
    	return valueToStringImpl(reflect.ValueOf(ToInterface(v)))
    }
    
    func valueToStringImpl(val reflect.Value) string {
    	var str string
    	if !val.IsValid() {
    		return "<zero Value>"
    	}
    	typ := val.Type()
    	switch val.Kind() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 26 14:24:17 UTC 2021
    - 2.4K bytes
    - Viewed (0)
  4. src/go/internal/gccgoimporter/testdata/nointerface.gox

    v3;
    package nointerface
    pkgpath nointerface
    types 3 2 133 17
    type 1 "I" <type -11>
     func /*nointerface*/ (p <esc:0x1> <type 2>) Get () <type -11>
     func (p <esc:0x1> <type 2>) Set (v <type -11>)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 04 15:52:48 UTC 2018
    - 211 bytes
    - Viewed (0)
  5. src/go/internal/gccgoimporter/testdata/nointerface.go

    // Copyright 2018 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 nointerface
    
    type I int
    
    //go:nointerface
    func (p *I) Get() int { return int(*p) }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 04 15:52:48 UTC 2018
    - 289 bytes
    - Viewed (0)
  6. test/fixedbugs/issue63333.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    func f(interface{ m() }) {}
    func g()                 { f(new(T)) } // ERROR "m method is marked 'nointerface'"
    
    type T struct{}
    
    //go:nointerface
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:44:52 UTC 2023
    - 374 bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/reflect/TypeTokenTest.java

    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 88.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/subr.go

    		return ""
    	}
    
    	if isptrto(t, types.TINTER) {
    		return fmt.Sprintf("%v is pointer to interface, not interface", t)
    	} else if have != nil && have.Sym == missing.Sym && have.Nointerface() {
    		return fmt.Sprintf("%v does not implement %v (%v method is marked 'nointerface')", t, iface, missing.Sym)
    	} else if have != nil && have.Sym == missing.Sym {
    		return fmt.Sprintf("%v does not implement %v (wrong type for %v method)\n"+
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:45:58 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/reflect/TypeTokenTest.java

    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 88.7K bytes
    - Viewed (0)
  10. src/go/internal/gccgoimporter/importer_test.go

    	{pkgpath: "nointerface", name: "I", want: "type I int"},
    	{pkgpath: "issue29198", name: "FooServer", gccgoVersion: 7, want: "type FooServer struct{FooServer *FooServer; user string; ctx context.Context}"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:17:57 UTC 2022
    - 7.2K bytes
    - Viewed (0)
Back to top