This commit is contained in:
Araq
2012-06-21 18:51:19 +02:00
parent 26b64f9e4f
commit d1c84328a7
3 changed files with 15 additions and 3 deletions

View File

@@ -583,6 +583,8 @@ proc getTypeDescAux(m: BModule, typ: PType, check: var TIntSet): PRope =
else:
InternalError("getTypeDescAux(" & $t.kind & ')')
result = nil
# fixes bug #145:
excl(check, t.id)
proc getTypeDesc(m: BModule, typ: PType): PRope =
var check = initIntSet()

View File

@@ -53,3 +53,15 @@ proc `$`*(status: TStatusEnum): string =
proc makeCommitPath*(platform, hash: string): string =
return platform / "nimrod_" & hash.substr(0, 11) # 11 Chars.
type
TFlag = enum
A, B, C, D
TFlags = set[TFlag]
TObj = object
x: int
flags: TFlags
# have a proc taking TFlags as param and returning object having TFlags field
proc foo(flags: TFlags): TObj = nil

View File

@@ -1,6 +1,7 @@
version 0.9.0
=============
- complete and document optional indentation for 'case' statement
- implement a warning message for shadowed 'result' variable
- make templates hygienic by default: try to gensym() everything in the 'block'
of a template
@@ -149,9 +150,6 @@ Version 2 and beyond
- implement/generalize the effect system; checked exceptions
- const ptr/ref
- optional indentation for 'case' statement; hm, keep in mind other syntax
changes that people want; may turn out to be a bad idea
- language change: inheritance should only work with reference types, so that
the ``type`` field is not needed for objects! --> zero overhead aggregation
BETTER: ``of`` and safe object conversions only work with ref objects. Same