The test expression in the comparison is of `Coin` type but it is misinterpreted as `any` type by the typechecker