GULPF/nimquery

Object case transition no longer allowed

zedeus opened this issue · 1 comments

Using nimquery at runtime I get this error:
assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period

When building these warnings happen:

nimquery.nim(183, 17) Warning: Potential object case transition, instantiate new object instead [CaseTransition]
nimquery.nim(176, 17) Warning: Potential object case transition, instantiate new object instead [CaseTransition]
nimquery.nim(180, 17) Warning: Potential object case transition, instantiate new object instead [CaseTransition]
nimquery.nim(172, 17) Warning: Potential object case transition, instantiate new object instead [CaseTransition]
nimquery.nim(188, 17) Warning: Potential object case transition, instantiate new object instead [CaseTransition]

They're the object init procs, where you do result.kind =. I tried replacing that with Demand(kind: ..., but that gave this error:
nimquery.nim(175, 11) Error: you must provide a compile-time value for the discriminator 'kind' in order to prove that it's safe to initialize 'element'.

GULPF commented

Fixed by #5