fixes #145
This commit is contained in:
parent
26b64f9e4f
commit
d1c84328a7
3 changed files with 15 additions and 3 deletions
|
|
@ -583,6 +583,8 @@ proc getTypeDescAux(m: BModule, typ: PType, check: var TIntSet): PRope =
|
||||||
else:
|
else:
|
||||||
InternalError("getTypeDescAux(" & $t.kind & ')')
|
InternalError("getTypeDescAux(" & $t.kind & ')')
|
||||||
result = nil
|
result = nil
|
||||||
|
# fixes bug #145:
|
||||||
|
excl(check, t.id)
|
||||||
|
|
||||||
proc getTypeDesc(m: BModule, typ: PType): PRope =
|
proc getTypeDesc(m: BModule, typ: PType): PRope =
|
||||||
var check = initIntSet()
|
var check = initIntSet()
|
||||||
|
|
|
||||||
|
|
@ -53,3 +53,15 @@ proc `$`*(status: TStatusEnum): string =
|
||||||
proc makeCommitPath*(platform, hash: string): string =
|
proc makeCommitPath*(platform, hash: string): string =
|
||||||
return platform / "nimrod_" & hash.substr(0, 11) # 11 Chars.
|
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
|
||||||
|
|
|
||||||
4
todo.txt
4
todo.txt
|
|
@ -1,6 +1,7 @@
|
||||||
version 0.9.0
|
version 0.9.0
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
- complete and document optional indentation for 'case' statement
|
||||||
- implement a warning message for shadowed 'result' variable
|
- implement a warning message for shadowed 'result' variable
|
||||||
- make templates hygienic by default: try to gensym() everything in the 'block'
|
- make templates hygienic by default: try to gensym() everything in the 'block'
|
||||||
of a template
|
of a template
|
||||||
|
|
@ -149,9 +150,6 @@ Version 2 and beyond
|
||||||
- implement/generalize the effect system; checked exceptions
|
- implement/generalize the effect system; checked exceptions
|
||||||
- const ptr/ref
|
- 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
|
- language change: inheritance should only work with reference types, so that
|
||||||
the ``type`` field is not needed for objects! --> zero overhead aggregation
|
the ``type`` field is not needed for objects! --> zero overhead aggregation
|
||||||
BETTER: ``of`` and safe object conversions only work with ref objects. Same
|
BETTER: ``of`` and safe object conversions only work with ref objects. Same
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue