styleCheck: make the compiler and large parts of the stdlib compatible with --styleCheck:error
This commit is contained in:
parent
96523cdd3e
commit
c94647aeca
90 changed files with 680 additions and 652 deletions
|
|
@ -99,7 +99,7 @@ when not defined(nimV2):
|
|||
return true
|
||||
|
||||
proc isObjWithCache(obj, subclass: PNimType;
|
||||
cache: var ObjCheckCache): bool {.compilerProc, inline.} =
|
||||
cache: var ObjCheckCache): bool {.compilerproc, inline.} =
|
||||
if obj == subclass: return true
|
||||
if obj.base == subclass: return true
|
||||
if cache[0] == obj: return false
|
||||
|
|
@ -116,6 +116,6 @@ when not defined(nimV2):
|
|||
return true
|
||||
|
||||
when defined(nimV2):
|
||||
proc nimFieldDiscriminantCheckV2(oldDiscVal, newDiscVal: uint8) {.compilerProc.} =
|
||||
proc nimFieldDiscriminantCheckV2(oldDiscVal, newDiscVal: uint8) {.compilerproc.} =
|
||||
if oldDiscVal != newDiscVal:
|
||||
sysFatal(FieldError, "assignment to discriminant changes object branch")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue