Fix some reversed type of arm pattern and type of search pattern in error message.
Previously check always succeeded because struct type was derived from the matched expression, not the matched pattern.