Closed
Description
--incremental:on fails on simplest example
Example
# main.nim:
echo "ok1"
build nim with -d:nimIncremental (and --stacktrace:on --debugger:native)
nim c -r --incremental:on --nimcache:/tmp/d01 main.nim
change ok1 to ok2
nim c -r --incremental:on --nimcache:/tmp/d01 main.nim
Current Output
/Users/timothee/git_clone/nim/Nim_prs/compiler/nim.nim(118) nim
/Users/timothee/git_clone/nim/Nim_prs/compiler/nim.nim(95) handleCmdLine
/Users/timothee/git_clone/nim/Nim_prs/compiler/cmdlinehelper.nim(105) loadConfigsAndRunMainCommand
/Users/timothee/git_clone/nim/Nim_prs/compiler/main.nim(190) mainCommand
/Users/timothee/git_clone/nim/Nim_prs/compiler/main.nim(92) commandCompileToC
/Users/timothee/git_clone/nim/Nim_prs/compiler/modules.nim(141) compileProject
/Users/timothee/git_clone/nim/Nim_prs/compiler/modules.nim(123) compileSystemModule
/Users/timothee/git_clone/nim/Nim_prs/compiler/modules.nim(83) compileModule
/Users/timothee/git_clone/nim/Nim_prs/compiler/passes.nim(145) processModule
/Users/timothee/git_clone/nim/Nim_prs/compiler/rodimpl.nim(909) loadNode
/Users/timothee/git_clone/nim/Nim_prs/compiler/rodimpl.nim(811) loadModuleSymTab
/Users/timothee/git_clone/nim/Nim_prs/compiler/rodimpl.nim(724) loadSymFromBlob
/Users/timothee/.choosenim/toolchains/nim-1.0.6/lib/system/assign.nim(243) FieldDiscriminantCheck
/Users/timothee/.choosenim/toolchains/nim-1.0.6/lib/system/fatal.nim(39) sysFatal
Error: unhandled exception: assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period [FieldError]
Expected Output
no crash
Additional Information
- latest devel 1ab37cc