Files
dolt/types/enum.go
Chris Masone eda9b92870 Rename types.TypeRef to types.Type
There are probably still a lot of variable names and comments to fix,
but this updates all the Go code.

Towards #441
2015-11-09 08:26:32 -08:00

34 lines
510 B
Go

package types
import "github.com/attic-labs/noms/ref"
type Enum struct {
v uint32
t Type
}
func newEnum(v uint32, t Type) Enum {
return Enum{v, t}
}
func (e Enum) Equals(other Value) bool {
return other != nil && e.t.Equals(other.Type()) && e.Ref() == other.Ref()
}
func (e Enum) Ref() ref.Ref {
throwaway := ref.Ref{}
return EnsureRef(&throwaway, e)
}
func (e Enum) Chunks() []ref.Ref {
return nil
}
func (e Enum) ChildValues() []Value {
return nil
}
func (e Enum) Type() Type {
return e.t
}