I am compiling using sol 0.8.0 and the following line is producing the error in the title:
uint256 public constant MASK = uint128(~0);
Explicit type conversion not allowed from "int_const -1" to "uint128".
When changing the variable to this:
uint256 public constant MASK = ~0;
The error changes to:
Type int_const -1 is not implicitly convertible to expected type uint256. Cannot implicitly convert signed literal to unsigned type.