cue: clarify behavior of matchBinOpKind

Change-Id: I73781ff634c116e14a9374a1857c20a3aad4c17c
Reviewed-by: Marcel van Lohuizen <>
diff --git a/cue/kind.go b/cue/kind.go
index a6c3e2e..7355965 100644
--- a/cue/kind.go
+++ b/cue/kind.go
@@ -163,8 +163,11 @@
 var toKindInfo = map[kind]*kindInfo{}
-// matchBinOpKind reports whether the given op is possible for the given kinds
-// and what the result will be. Evaluating binary expressions uses this to
+// matchBinOpKind returns the result kind of applying the given op to operands with
+// the given kinds. The operation is disallowed if the return value is bottomKind. If
+// the second return value is true, the operands should be swapped before evaluation.
+// Evaluating binary expressions uses this to
 // - fail incompatible operations early, even if the concrete types are
 //   not known,
 // - check the result type of unification,