mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 06:23:39 +00:00
reflect: add pointerTo()
This commit is contained in:
committed by
Damian Gryski
parent
ca823f9a0d
commit
3a3de8a778
@@ -1017,7 +1017,7 @@ func Zero(typ Type) Value {
|
||||
// new value of the given type.
|
||||
func New(typ Type) Value {
|
||||
return Value{
|
||||
typecode: PtrTo(typ).(*rawType),
|
||||
typecode: pointerTo(typ.(*rawType)),
|
||||
value: alloc(typ.Size(), nil),
|
||||
flags: valueFlagExported,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user