bugfix: 'when' sections in generic objects now work, so TThread[void] compiles

This commit is contained in:
Araq 2011-11-20 16:13:03 +01:00
commit 72651de710
13 changed files with 153 additions and 77 deletions

View file

@ -224,7 +224,7 @@ proc setStyle*(style: set[TStyle]) =
if styleBlink in style: a = a or int16(BACKGROUND_INTENSITY)
if styleReverse in style: a = a or 0x4000'i16 # COMMON_LVB_REVERSE_VIDEO
if styleUnderscore in style: a = a or 0x8000'i16 # COMMON_LVB_UNDERSCORE
discard SetConsoleTextAttribute(conHandle, old or a)
discard SetConsoleTextAttribute(conHandle, a)
else:
for s in items(style):
stdout.write("\e[" & $ord(s) & 'm')