implemented dataflow analysis; activate via --warning[Uninit]:on

This commit is contained in:
Araq 2013-06-04 21:58:39 +02:00
commit 2aaa8f7909
6 changed files with 185 additions and 26 deletions

View file

@ -190,7 +190,7 @@ proc semCase(c: PContext, n: PNode): PNode =
var typ = CommonTypeBegin
var hasElse = false
case skipTypes(n.sons[0].Typ, abstractVarRange-{tyTypeDesc}).Kind
of tyInt..tyInt64, tyChar, tyEnum:
of tyInt..tyInt64, tyChar, tyEnum, tyUInt..tyUInt32:
chckCovered = true
of tyFloat..tyFloat128, tyString, tyError:
nil