Browse Source

Support initialized map values in another global

pull/6/head
Ayke van Laethem 6 years ago
parent
commit
0b372ba5bd
No known key found for this signature in database GPG Key ID: E97FF5335DFDFDED
  1. 2
      interpreter.go

2
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:

Loading…
Cancel
Save