# Report incompatible types

**URL:** https://community.graylog.org/t/report-incompatible-types/4653
**Category:** Graylog Central (peer support)
**Created:** [March 21, 2018, 8:27am UTC](https://community.graylog.org/t/report-incompatible-types/4653 "2018-03-21T08:27:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cdeng](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@cdeng](https://community.graylog.org/u/cdeng)
#### Post date: [March 21, 2018, 8:27am UTC](https://community.graylog.org/t/report-incompatible-types/4653/1 "2018-03-21T08:27:08Z")

</div>

in a “when” clause put a boolean expression as “regex(…).matches && not regex(…).matches”, system will report incompatible types between (regex(…).matches) and (not regex(…).matches):  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/3/340367f0dec19fe6899de3bdde06474f81bd5ef6.png)

is it a bug?

---

<div class="post-metadata">

### Author: ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)
#### Post date: [March 21, 2018, 8:33am UTC](https://community.graylog.org/t/report-incompatible-types/4653/2 "2018-03-21T08:33:22Z")

</div>

`&& not` is not a valid comparison operator.

Try to be explicit about the comparisons, for example:

```auto
regex(...).matches == true && regex(...).matches == false

```

---

<div class="post-metadata">

### Author: ![cdeng](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@cdeng](https://community.graylog.org/u/cdeng)
#### Post date: [March 21, 2018, 8:56am UTC](https://community.graylog.org/t/report-incompatible-types/4653/3 "2018-03-21T08:56:09Z")

</div>

the way you mentioned works. but with more tests, i found it seems although regex(…).matches being boolean value, but it cannot as boolean value directly appears in the logic expression more than 2 times, for example, system will report error with:

```
regex(...).matches && regex(...).matches && regex(...).matches

```

but without error with both

```
   true && not false

```

and

```
 true && not false && not not true

```

this confused me a lot.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)
#### Post date: [April 4, 2018, 8:56am UTC](https://community.graylog.org/t/report-incompatible-types/4653/4 "2018-04-04T08:56:52Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
