Files
dolt/nomdl/pkg/unresolved_desc.go
T
Erik Arvidsson 3ff6ee6add Inline struct type declaration into chunk (#1324)
Struct type definition is now inlined into the chunk. To break
cycles we use back references.

- Removes unresolved type refs
- Removes packages

Fixes #1164
Fixes #1165
2016-04-27 20:39:51 -07:00

28 lines
629 B
Go

package pkg
import "github.com/attic-labs/noms/types"
const UnresolvedKind = 100
// UnresolvedDesc represents a named reference to a type.
type UnresolvedDesc struct {
Namespace string
Name string
}
func (desc UnresolvedDesc) Kind() types.NomsKind {
return UnresolvedKind
}
func (desc UnresolvedDesc) Equals(other types.TypeDesc) bool {
if other.Kind() != UnresolvedKind {
return false
}
d2 := other.(UnresolvedDesc)
return d2.Namespace == desc.Namespace && d2.Name == desc.Namespace
}
func makeUnresolvedType(namespace, name string) *types.Type {
return &types.Type{Desc: UnresolvedDesc{namespace, name}}
}