remove stdlib case transitions (#11401)

This commit is contained in:
Jasper Jenkins 2019-06-04 23:04:29 -07:00 • committed by Andreas Rumpf
commit 71388caf2e
3 changed files with 6 additions and 4 deletions

View file

@ -700,7 +700,7 @@ when isMainModule:
var test3: TestObj
test3.test = 42
test3.test2 = blah2
test3 = TestObj(test2: blah2)
var x3 = toAny(test3)
i = 0
for n, a in fields(x3):

View file

@ -375,7 +375,7 @@ when not defined(testing) and isMainModule:
var test3: TestObj
test3.test = 42
test3.test2 = blah
test3 = TestObj(test2: blah)
testit(test3)
var test4: ref tuple[a, b: string]

View file

@ -391,8 +391,10 @@ proc ignoreMsg*(c: CfgParser, e: CfgEvent): string {.rtl, extern: "npc$1".} =
proc getKeyValPair(c: var CfgParser, kind: CfgEventKind): CfgEvent =
if c.tok.kind == tkSymbol:
result = CfgEvent(kind: cfgKeyValuePair, key: c.tok.literal, value: "")
result.kind = kind
case kind
of cfgOption, cfgKeyValuePair:
result = CfgEvent(kind: kind, key: c.tok.literal, value: "")
else: discard
rawGetTok(c, c.tok)
if c.tok.kind in {tkEquals, tkColon}:
rawGetTok(c, c.tok)