You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cue: define all Kind constant values explicitly with that type
go doc (somewhat understandably) fails to see constant values of type
Kind unless they are explicitly defined to be of that type, even though
Kind is defined as an alias of adt.Kind and the values assigned to those
constants are of the type adt.Kind.
This is most easily seen by looking at the output of go doc:
$ go doc -all Kind
package cue // import "."
type Kind = adt.Kind
Kind determines the underlying type of a Value.
const BottomKind Kind = 0
Compare the result of this CL which explicitly assigns the Kind type to
all constants:
package cue // import "."
type Kind = adt.Kind
Kind determines the underlying type of a Value.
const (
// BottomKind represents the bottom value.
BottomKind Kind = adt.BottomKind
// NullKind indicates a null value.
NullKind Kind = adt.NullKind
// BoolKind indicates a boolean value.
BoolKind Kind = adt.BoolKind
// IntKind represents an integral number.
IntKind Kind = adt.IntKind
// FloatKind represents a decimal float point number that cannot be
// converted to an integer. The underlying number may still be integral,
// but resulting from an operation that enforces the float type.
FloatKind Kind = adt.FloatKind
// StringKind indicates any kind of string.
StringKind Kind = adt.StringKind
// BytesKind is a blob of data.
BytesKind Kind = adt.BytesKind
// StructKind is a kev-value map.
StructKind Kind = adt.StructKind
// ListKind indicates a list of values.
ListKind Kind = adt.ListKind
// NumberKind represents any kind of number.
NumberKind Kind = IntKind | FloatKind
// TopKind represents the top value.
TopKind Kind = adt.TopKind
)
Fixes#1350
Signed-off-by: Paul Jolly <paul@myitcv.io>
Change-Id: I94ec605bda0ffdb054a9fe226fb3d5a44607bc9a
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/526636
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
0 commit comments