Skip to content

Commit 030658e

Browse files
committed
internal/core/adt: support unary == and != for all types
Issue #2583 Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I7e2535aa1e218aa875f44e245bddfee453c332ba Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1217011 Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
1 parent 34faddf commit 030658e

File tree

4 files changed

+404
-27
lines changed

4 files changed

+404
-27
lines changed

cue/parser/parser.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,11 @@ func (p *parser) parseUnaryExpr() ast.Expr {
14831483
}
14841484

14851485
switch p.tok {
1486+
case token.EQL:
1487+
if !p.experiments.StructCmp {
1488+
break
1489+
}
1490+
fallthrough
14861491
case token.ADD, token.SUB, token.NOT, token.MUL,
14871492
token.LSS, token.LEQ, token.GEQ, token.GTR,
14881493
token.NEQ, token.MAT, token.NMAT:

0 commit comments

Comments
 (0)