Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestPtrToMethods (0.4 sec)

  1. src/reflect/all_test.go

    	check("PtrTo", PointerTo(TypeOf(T{})))
    	check("SliceOf", SliceOf(TypeOf(T{})))
    }
    
    type XM struct{ _ bool }
    
    func (*XM) String() string { return "" }
    
    func TestPtrToMethods(t *testing.T) {
    	var y struct{ XM }
    	yp := New(TypeOf(y)).Interface()
    	_, ok := yp.(fmt.Stringer)
    	if !ok {
    		t.Fatal("does not implement Stringer, but should")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top