diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-12-19 10:03:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-19 10:03:22 +0100 |
commit | 72500420d36172af18262937b5300e3a8a698a47 (patch) | |
tree | 6ae71b87e815a98dc2a3e26ca4ff91989f361b6d /compiler/semstmts.nim | |
parent | 48437d0a840a0be805dd19e842c39b2ca43f6712 (diff) | |
parent | e6c510bbbd9fbd076a722c5b2b2626485a16b93e (diff) | |
download | Nim-72500420d36172af18262937b5300e3a8a698a47.tar.gz |
Fixes #3060 and adds error checking for invalid else branches in object variants (#9957)
* Fix semRecordCase * Fix ftpclient.nim * Check for ordinal type * Check tyRange for exhaustiveness
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 277fbd75f..4d6c6dfb0 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -95,13 +95,6 @@ proc semWhile(c: PContext, n: PNode; flags: TExprFlags): PNode = elif efInTypeof in flags: result.typ = n[1].typ -proc toCover(c: PContext, t: PType): BiggestInt = - let t2 = skipTypes(t, abstractVarRange-{tyTypeDesc}) - if t2.kind == tyEnum and enumHasHoles(t2): - result = sonsLen(t2.n) - else: - result = lengthOrd(c.config, skipTypes(t, abstractVar-{tyTypeDesc})) - proc semProc(c: PContext, n: PNode): PNode proc semExprBranch(c: PContext, n: PNode; flags: TExprFlags = {}): PNode = |