To summarize, for these examples, I would expect different error messages as the difference is the use of the same variable across patterns versus in the same pattern.
In the first case, we have two patterns, one where the variable
r is equal to the path, and then a second pattern it is trying to bind a path (
r) to a node. In this scenario, I would expect a type conflict error as we are trying to bind a path to a node.
In the second case, we are attempting to bind the variable `p` twice within the same pattern. Once as the path variable (p=) and once as the first node in the path ( (p)-[]-()). Since this is the same pattern, the error would be different, as there is not a way to know the type of data being bound.
Hopefully, this helps.
Thanks,
Dave