Browse Source
Support initialized map values in another global
pull/6/head
Ayke van Laethem
6 years ago
No known key found for this signature in database
GPG Key ID: E97FF5335DFDFDED
1 changed files with
2 additions and
0 deletions
-
interpreter.go
|
@ -228,6 +228,8 @@ func (p *Program) getZeroValue(t types.Type) (Value, error) { |
|
|
return &ZeroBasicValue{typ}, nil |
|
|
return &ZeroBasicValue{typ}, nil |
|
|
case *types.Interface: |
|
|
case *types.Interface: |
|
|
return &InterfaceValue{typ, nil}, nil |
|
|
return &InterfaceValue{typ, nil}, nil |
|
|
|
|
|
case *types.Map: |
|
|
|
|
|
return &MapValue{typ, nil, nil}, nil |
|
|
case *types.Pointer: |
|
|
case *types.Pointer: |
|
|
return &PointerValue{nil}, nil |
|
|
return &PointerValue{nil}, nil |
|
|
case *types.Struct: |
|
|
case *types.Struct: |
|
|