mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 05:23:40 +00:00
Implement global interface variable constant
This commit is contained in:
@@ -224,6 +224,8 @@ func (p *Program) getZeroValue(t types.Type) (Value, error) {
|
||||
return &ArrayValue{typ.Elem(), elems}, nil
|
||||
case *types.Basic:
|
||||
return &ZeroBasicValue{typ}, nil
|
||||
case *types.Interface:
|
||||
return &InterfaceValue{typ}, nil
|
||||
case *types.Pointer:
|
||||
return &PointerValue{nil}, nil
|
||||
case *types.Struct:
|
||||
@@ -259,6 +261,11 @@ type PointerValue struct {
|
||||
Elem *Value
|
||||
}
|
||||
|
||||
type InterfaceValue struct {
|
||||
Type *types.Interface
|
||||
//Elem Value
|
||||
}
|
||||
|
||||
type PointerBitCastValue struct {
|
||||
Type types.Type
|
||||
Elem Value
|
||||
|
||||
Reference in New Issue
Block a user