internal/lib/reflect: Value.New
This commit is contained in:
@@ -1799,7 +1799,6 @@ const maxZero = runtime.MaxZero
|
|||||||
// New returns a Value representing a pointer to a new zero value
|
// New returns a Value representing a pointer to a new zero value
|
||||||
// for the specified type. That is, the returned Value's Type is PointerTo(typ).
|
// for the specified type. That is, the returned Value's Type is PointerTo(typ).
|
||||||
func New(typ Type) Value {
|
func New(typ Type) Value {
|
||||||
/*
|
|
||||||
if typ == nil {
|
if typ == nil {
|
||||||
panic("reflect: New(nil)")
|
panic("reflect: New(nil)")
|
||||||
}
|
}
|
||||||
@@ -1812,8 +1811,6 @@ func New(typ Type) Value {
|
|||||||
ptr := unsafe_New(t)
|
ptr := unsafe_New(t)
|
||||||
fl := flag(Pointer)
|
fl := flag(Pointer)
|
||||||
return Value{pt, ptr, fl}
|
return Value{pt, ptr, fl}
|
||||||
*/
|
|
||||||
panic("todo: reflect.New")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewAt returns a Value representing a pointer to a value of the
|
// NewAt returns a Value representing a pointer to a value of the
|
||||||
|
|||||||
Reference in New Issue
Block a user