Precedence in compound conditions

The documentation states:

Compound conditions are evaluated in the following order of precedence: […] Then the boolean operators in the order NOT, AND, and finally OR.

But the following prints “FALSE”:

cmake_minimum_required(VERSION 3.22)

project(Test)

if(YES OR NO AND NO)
    message("TRUE")
else()
    message("FALSE")
endif()

So the expression isn’t being evaluated as YES OR (NO AND NO). Could someone explain this surprising behavior?

Must be a bug, so I’ve opened an issue.