diff options
author | Araq <rumpf_a@web.de> | 2018-04-06 13:01:24 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-04-06 13:01:24 +0200 |
commit | 824092be312ff16445f137c4322d0cd3cc95fb2e (patch) | |
tree | 7bcbf377b6df89c7a438aaf1a9964fca6a8fabe4 /compiler | |
parent | 0872e7a27e08c551f21cfcf3f8963f6f452f62cf (diff) | |
download | Nim-824092be312ff16445f137c4322d0cd3cc95fb2e.tar.gz |
fixes a regression about static object case variant checking
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semobjconstr.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/semobjconstr.nim b/compiler/semobjconstr.nim index e2296a0d2..cfa0fbd05 100644 --- a/compiler/semobjconstr.nim +++ b/compiler/semobjconstr.nim @@ -77,7 +77,9 @@ proc semConstrField(c: PContext, flags: TExprFlags, proc caseBranchMatchesExpr(branch, matched: PNode): bool = for i in 0 .. branch.len-2: - if exprStructuralEquivalent(branch[i], matched): + if branch[i].kind == nkRange: + if overlap(branch[i], matched): return true + elif exprStructuralEquivalent(branch[i], matched): return true return false |