Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestFieldByIndexErr (0.13 sec)

  1. src/reflect/visiblefields_test.go

    					t.Fatalf("unexpected FieldByName result; got %#v want %#v", gotField1, expectField)
    				}
    			}
    		})
    	}
    }
    
    // Must not panic with nil embedded pointer.
    func TestFieldByIndexErr(t *testing.T) {
    	type A struct {
    		S string
    	}
    	type B struct {
    		*A
    	}
    	v := ValueOf(B{})
    	_, err := v.FieldByIndexErr([]int{0, 0})
    	if err == nil {
    		t.Fatal("expected error")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 08 13:44:41 UTC 2022
    - 5.3K bytes
    - Viewed (0)
Back to top