fix #1858; Add support for generic templates and macros
Implementation notes: Just after overload resolution, the resolved generic params will be added to the call expression to be later processed in evalTemplate and evalMacroCall. These procs have been modified to handle the increased number of parameters, but one remaining issue is that immediate templates and macros don't go through the same process. The next commit will outlaw the use of generic parameters with such macros.
This commit is contained in:
parent
13a18663d2
commit
5e4ae8dbb4
6 changed files with 109 additions and 44 deletions
|
|
@ -1341,6 +1341,10 @@ proc skipTypes*(t: PType, kinds: TTypeKinds): PType =
|
|||
result = t
|
||||
while result.kind in kinds: result = lastSon(result)
|
||||
|
||||
proc safeSkipTypes*(t: PType, kinds: TTypeKinds): PType =
|
||||
result = if t != nil: t.skipTypes(kinds)
|
||||
else: nil
|
||||
|
||||
proc isGCedMem*(t: PType): bool {.inline.} =
|
||||
result = t.kind in {tyString, tyRef, tySequence} or
|
||||
t.kind == tyProc and t.callConv == ccClosure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue