mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 03:03:27 +00:00
Support initialized map values in another global
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user