package decoder

import (
	
	

	
)

type invalidDecoder struct {
	typ        reflect.Type
	kind       reflect.Kind
	structName string
	fieldName  string
}

func newInvalidDecoder( reflect.Type, ,  string) *invalidDecoder {
	return &invalidDecoder{
		typ:        ,
		kind:       .Kind(),
		structName: ,
		fieldName:  ,
	}
}

// Decode skips the value, which no value of the type can be decoded from: it is a type error, as encoding/json
// reports it, but null, which is ignored.
func ( *invalidDecoder) ( *RuntimeContext, ,  int64,  unsafe.Pointer) (int64, error) {
	 := .Buf
	 = skipWhiteSpace(, )
	if [] == 'n' {
		if  := validateNull(, );  != nil {
			return 0, 
		}
		return  + 4, nil
	}
	return .skipTypeError(, , .typ)
}

func ( *invalidDecoder) ( *RuntimeContext, ,  int64) ([][]byte, int64, error) {
	return nil, 0, &errors.UnmarshalTypeError{
		Value:  "object",
		Type:   .typ,
		Offset: ,
		Struct: .structName,
		Field:  .fieldName,
	}
}