diff options
author | Araq <rumpf_a@web.de> | 2019-05-28 21:30:41 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-05-28 21:30:41 +0200 |
commit | 8bb1a6b04189b6c0f7438ac1b1c17099789f2bd6 (patch) | |
tree | 6960f9902d3848c159a661f5b2e46e90b9aa9388 /lib/system | |
parent | bcccc7dec8d818fc60d843e4dff85011f6466ccb (diff) | |
download | Nim-8bb1a6b04189b6c0f7438ac1b1c17099789f2bd6.tar.gz |
fixes #11205
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/chcks.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/system/chcks.nim b/lib/system/chcks.nim index 303a8945a..d01dfec9a 100644 --- a/lib/system/chcks.nim +++ b/lib/system/chcks.nim @@ -114,3 +114,8 @@ when not defined(nimV2): if x == nil: return false x = x.base return true + +when defined(nimV2): + proc nimFieldDiscriminantCheckV2(oldDiscVal, newDiscVal: uint8) {.compilerProc.} = + if oldDiscVal != newDiscVal: + sysFatal(FieldError, "assignment to discriminant changes object branch") |