It seems the parser's unable to handle piped declarations that don't start with a recognized name.
Yes, in places where an expression is allowed the "naked" pipe syntax is indistinguishable from a bitwise or expression, so it is not recognized as a type.
You can use object(Foo|Bar) to circumvent the problem.