mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
handle the nil interface better in reflect and print
R=rsc DELTA=25 (19 added, 0 deleted, 6 changed) OCL=20985 CL=20985
This commit is contained in:
parent
793a6effcf
commit
ac09eb4f49
3 changed files with 25 additions and 6 deletions
|
|
@ -59,6 +59,7 @@ type Creator *(typ Type, addr Addr) Value
|
|||
export type MissingValue interface {
|
||||
Kind() int;
|
||||
Type() Type;
|
||||
Addr() Addr;
|
||||
}
|
||||
|
||||
type MissingValueStruct struct {
|
||||
|
|
@ -66,7 +67,7 @@ type MissingValueStruct struct {
|
|||
}
|
||||
|
||||
func MissingCreator(typ Type, addr Addr) Value {
|
||||
return &MissingValueStruct{ Common{IntKind, typ, addr} }
|
||||
return &MissingValueStruct{ Common{MissingKind, typ, addr} }
|
||||
}
|
||||
|
||||
// -- Int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue