support for inferring static[T] concept params
This commit is contained in:
parent
8cd5f1f8f5
commit
76c663f692
8 changed files with 144 additions and 28 deletions
|
|
@ -490,6 +490,7 @@ type
|
|||
tfHasStatic
|
||||
tfGenericTypeParam
|
||||
tfImplicitTypeParam
|
||||
tfInferrableStatic
|
||||
tfWildcard # consider a proc like foo[T, I](x: Type[T, I])
|
||||
# T and I here can bind to both typedesc and static types
|
||||
# before this is determined, we'll consider them to be a
|
||||
|
|
@ -1073,6 +1074,9 @@ proc isMetaType*(t: PType): bool =
|
|||
(t.kind == tyStatic and t.n == nil) or
|
||||
tfHasMeta in t.flags
|
||||
|
||||
proc isUnresolvedStatic*(t: PType): bool =
|
||||
return t.kind == tyStatic and t.n == nil
|
||||
|
||||
proc linkTo*(t: PType, s: PSym): PType {.discardable.} =
|
||||
t.sym = s
|
||||
s.typ = t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue