mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 04:27:44 +00:00
Fixed isNil codegen in JS
This commit is contained in:
@@ -1324,7 +1324,7 @@ proc genMagic(p: PProc, n: PNode, r: var TCompRes) =
|
||||
of mEqStr: binaryExpr(p, n, r, "eqStrings", "eqStrings($1, $2)")
|
||||
of mLeStr: binaryExpr(p, n, r, "cmpStrings", "(cmpStrings($1, $2) <= 0)")
|
||||
of mLtStr: binaryExpr(p, n, r, "cmpStrings", "(cmpStrings($1, $2) < 0)")
|
||||
of mIsNil: unaryExpr(p, n, r, "", "$1 == null")
|
||||
of mIsNil: unaryExpr(p, n, r, "", "($1 === null)")
|
||||
of mEnumToStr: genRepr(p, n, r)
|
||||
of mNew, mNewFinalize: genNew(p, n)
|
||||
of mSizeOf: r.res = rope(getSize(n.sons[1].typ))
|
||||
|
||||
Reference in New Issue
Block a user