Permalink
Browse files

Add logical and/or operator support to types.Const

  • Loading branch information...
1 parent eb2d3c8 commit a9cb111c84de4dc1859fd2c903b65538aab818a1 @axw committed May 10, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 types/const.go
View
@@ -251,6 +251,10 @@ func binaryBoolOp(x bool, op token.Token, y bool) interface{} {
return x == y
case token.NEQ:
return x != y
+ case token.LAND:
+ return x && y
+ case token.LOR:
+ return x || y
}
panic("unreachable")
}

0 comments on commit a9cb111

Please sign in to comment.