Perhaps this should go to the driver section, I am not sure.
The error described in title can be produced by e.g.
ulong foo = 42; as_uint4(foo);
As the specification mandates the return type of as_* calls to have as many bits as the argument.
I've had this issue reported weeks ago and my understanding was just the opposite: I understood it failed because the arguments are the same size!
As far as I am concened, it should read:
"argument type to opencl as_* function: expected src and dst must have the same size"