deprecate += and friends for bool and enum (#10336)
* fixes #10257 * add version to deprecation
This commit is contained in:
parent
6fb618da4b
commit
8399e0f78a
1 changed files with 10 additions and 4 deletions
|
|
@ -3886,15 +3886,21 @@ proc gorgeEx*(command: string, input = "", cache = ""): tuple[output: string,
|
||||||
## Same as `gorge` but also returns the precious exit code.
|
## Same as `gorge` but also returns the precious exit code.
|
||||||
discard
|
discard
|
||||||
|
|
||||||
proc `+=`*[T: SomeOrdinal|uint|uint64](x: var T, y: T) {.
|
proc `+=`*[T: SomeInteger](x: var T, y: T) {.
|
||||||
magic: "Inc", noSideEffect.}
|
magic: "Inc", noSideEffect.}
|
||||||
## Increments an ordinal
|
## Increments an integer
|
||||||
|
|
||||||
proc `-=`*[T: SomeOrdinal|uint|uint64](x: var T, y: T) {.
|
proc `+=`*[T: enum|bool](x: var T, y: T) {.
|
||||||
|
magic: "Inc", noSideEffect, deprecated: "use `inc` instead".}
|
||||||
|
|
||||||
|
proc `-=`*[T: SomeInteger](x: var T, y: T) {.
|
||||||
magic: "Dec", noSideEffect.}
|
magic: "Dec", noSideEffect.}
|
||||||
## Decrements an ordinal
|
## Decrements an ordinal
|
||||||
|
|
||||||
proc `*=`*[T: SomeOrdinal|uint|uint64](x: var T, y: T) {.
|
proc `-=`*[T: enum|bool](x: var T, y: T) {.
|
||||||
|
magic: "Dec", noSideEffect, deprecated: "0.20.0, use `dec` instead".}
|
||||||
|
|
||||||
|
proc `*=`*[T: SomeInteger](x: var T, y: T) {.
|
||||||
inline, noSideEffect.} =
|
inline, noSideEffect.} =
|
||||||
## Binary `*=` operator for ordinals
|
## Binary `*=` operator for ordinals
|
||||||
x = x * y
|
x = x * y
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue