Skip to content

Commit

Permalink
dialect: remove old case object define
Browse files Browse the repository at this point in the history
note reset magic is still present
  • Loading branch information
saem committed Aug 6, 2022
1 parent aa11679 commit 66144e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
6 changes: 0 additions & 6 deletions config/nim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,6 @@ tcc.options.always = "-w"
--define:nimEmulateOverflowChecks
@end

@if nimv019:
--multimethods:on
--define:nimOldCaseObjects
--define:nimOldShiftRight
@end

@if lto or lto_incremental:
@if lto_incremental:
vcc.options.always%= "${vcc.options.always} /GL /Gw /Gy"
Expand Down
11 changes: 2 additions & 9 deletions lib/system/assign.nim
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,5 @@ proc FieldDiscriminantCheck(oldDiscVal, newDiscVal: int,
L: int) {.compilerproc.} =
let oldBranch = selectBranch(oldDiscVal, L, a)
let newBranch = selectBranch(newDiscVal, L, a)
when defined(nimOldCaseObjects):
if newBranch != oldBranch and oldDiscVal != 0:
sysFatal(FieldDefect, "assignment to discriminant changes object branch")
else:
if newBranch != oldBranch:
if oldDiscVal != 0:
sysFatal(FieldDefect, "assignment to discriminant changes object branch")
else:
sysFatal(FieldDefect, "assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period")
if newBranch != oldBranch:
sysFatal(FieldDefect, "assignment to discriminant changes object branch")

0 comments on commit 66144e5

Please sign in to comment.