Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for TypeAssertionError (0.18 sec)

  1. src/cmd/compile/internal/test/testdata/assert_test.go

    	}
    }
    
    func testAssertE2TPanic(t *testing.T) {
    	var got *U
    	defer func() {
    		if got != nil {
    			t.Errorf("e2t_ssa(s)=%v want nil", got)
    		}
    		e := recover()
    		err, ok := e.(*runtime.TypeAssertionError)
    		if !ok {
    			t.Errorf("e2t_ssa(s) panic type %T", e)
    		}
    		want := "interface conversion: interface {} is *main.S, not *main.U"
    		if err.Error() != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 2.5K bytes
    - Viewed (0)
  2. src/runtime/error.go

    	RuntimeError()
    }
    
    // A TypeAssertionError explains a failed type assertion.
    type TypeAssertionError struct {
    	_interface    *_type
    	concrete      *_type
    	asserted      *_type
    	missingMethod string // one method needed by Interface, missing from Concrete
    }
    
    func (*TypeAssertionError) RuntimeError() {}
    
    func (e *TypeAssertionError) Error() string {
    	inter := "interface"
    	if e._interface != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. src/runtime/iface.go

    		throw("internal error - misuse of itab")
    	}
    
    	// easy case
    	if typ.TFlag&abi.TFlagUncommon == 0 {
    		if canfail {
    			return nil
    		}
    		name := toRType(&inter.Type).nameOff(inter.Methods[0].Name)
    		panic(&TypeAssertionError{nil, typ, &inter.Type, name.Name()})
    	}
    
    	var m *itab
    
    	// First, look in the existing table to see if we can find the itab we need.
    	// This is by far the most common case, so do it without locks.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*PanicNilError).RuntimeError", Method, 21},
    		{"(*Pinner).Pin", Method, 21},
    		{"(*Pinner).Unpin", Method, 21},
    		{"(*StackRecord).Stack", Method, 0},
    		{"(*TypeAssertionError).Error", Method, 0},
    		{"(*TypeAssertionError).RuntimeError", Method, 0},
    		{"BlockProfile", Func, 1},
    		{"BlockProfileRecord", Type, 1},
    		{"BlockProfileRecord.Count", Field, 1},
    		{"BlockProfileRecord.Cycles", Field, 1},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  5. api/go1.txt

    pkg runtime, method (*MemProfileRecord) InUseObjects() int64
    pkg runtime, method (*MemProfileRecord) Stack() []uintptr
    pkg runtime, method (*StackRecord) Stack() []uintptr
    pkg runtime, method (*TypeAssertionError) Error() string
    pkg runtime, method (*TypeAssertionError) RuntimeError()
    pkg runtime, type Error interface { Error, RuntimeError }
    pkg runtime, type Error interface, Error() string
    pkg runtime, type Error interface, RuntimeError()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top