Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialect: remove old case object define #399

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")