the is operator now works with type classes and type variables
bugfixes: the DLL tests were failing on Mac OS X, due to an incorrect DynlibFormat
This commit is contained in:
parent
770d4a997e
commit
9c8bc3a244
13 changed files with 162 additions and 88 deletions
|
|
@ -610,17 +610,6 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
|
|||
result = newIntNodeT(sonsLen(a), n)
|
||||
else:
|
||||
result = magicCall(m, n)
|
||||
of mIs:
|
||||
# BUGFIX: don't evaluate this too early: ``T is void``
|
||||
if not containsGenericType(n[1].typ):
|
||||
if n[2].kind in {nkStrLit..nkTripleStrLit}:
|
||||
case n[2].strVal.normalize
|
||||
of "closure":
|
||||
let t = skipTypes(n[1].typ, abstractRange)
|
||||
result = newIntNodeT(ord(t.kind == tyProc and
|
||||
t.callConv == ccClosure), n)
|
||||
elif not containsGenericType(n[2].typ):
|
||||
result = newIntNodeT(ord(sameType(n[1].typ, n[2].typ)), n)
|
||||
of mAstToStr:
|
||||
result = newStrNodeT(renderTree(n[1], {renderNoComments}), n)
|
||||
of mConStrStr:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue