Implement the is operator for the new static and typedesc type classes
This also makes the first baby steps towards a sound treatment of higher-order kinds (type type int). Adds test cases showcasing the new features. * Also fixes breakage after the rebase
This commit is contained in:
parent
ab9969ed3b
commit
a49b06a52a
10 changed files with 210 additions and 55 deletions
|
|
@ -288,7 +288,8 @@ proc makeTypeDesc*(c: PContext, typ: PType): PType =
|
|||
result.addSonSkipIntLit(typ)
|
||||
|
||||
proc makeTypeSymNode*(c: PContext, typ: PType, info: TLineInfo): PNode =
|
||||
let typedesc = makeTypeDesc(c, typ)
|
||||
let typedesc = newTypeS(tyTypeDesc, c)
|
||||
typedesc.addSonSkipIntLit(assertNotNil(c.config, typ))
|
||||
let sym = newSym(skType, c.cache.idAnon, getCurrOwner(c), info,
|
||||
c.config.options).linkTo(typedesc)
|
||||
return newSymNode(sym, info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue