type R = record x: Int end proc f(r: R): Int return ~r (* @Error Type 'R' cannot be used with unary '~' *) end.