[Amendment] SE-0368: StaticBigInt

Here's another interesting quirk from the way negative literals are handled in Swift: while the negative sign is sometimes considered part of the literal, it still retains the same precedence as the negation operator. This leads to interesting cases like the one below.

extension Numeric {
    func incremented() -> Self {
        return self + 1
    }
}

-13.incremented()   // -14
(-13).incremented() // -12
-(13.incremented()) // -14
4 Likes