diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semfold.nim | 9 | ||||
-rw-r--r-- | compiler/sigmatch.nim | 5 |
2 files changed, 2 insertions, 12 deletions
diff --git a/compiler/semfold.nim b/compiler/semfold.nim index 70276a6d4..5fe4e3299 100644 --- a/compiler/semfold.nim +++ b/compiler/semfold.nim @@ -430,17 +430,10 @@ proc evalOp(m: TMagic, n, a, b, c: PNode): PNode = of mCompileOptionArg: result = newIntNodeT(ord( testCompileOptionArg(getStr(a), getStr(b), n.info)), n) - of mNewString, mNewStringOfCap, - mExit, mInc, ast.mDec, mEcho, mSwap, mAppendStrCh, - mAppendStrStr, mAppendSeqElem, mSetLengthStr, mSetLengthSeq, - mParseExprToAst, mParseStmtToAst, mExpandToAst, mTypeTrait, mDotDot, - mNLen..mNError, mEqRef, mSlurp, mStaticExec, mNGenSym, mSpawn, - mParallel, mPlugin, mGetTypeInfo, mTypeOf: - discard of mEqProc: result = newIntNodeT(ord( exprStructuralEquivalent(a, b, strictSymEquality=true)), n) - else: internalError(a.info, "evalOp(" & $m & ')') + else: discard proc getConstIfExpr(c: PSym, n: PNode): PNode = result = nil diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index b25f40c50..f6f029936 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -265,9 +265,6 @@ proc describeArgs*(c: PContext, n: PNode, startIdx = 1; proc typeRel*(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation proc concreteType(c: TCandidate, t: PType): PType = - # currently `[]=` is defined rather sloppily in system.nim, so we have - # a special type matching rule for it: - if c.calleeSym != nil and c.calleeSym.magic == mArrPut: return t case t.kind of tyArrayConstr: # make it an array @@ -1694,7 +1691,7 @@ proc partialMatch*(c: PContext, n, nOrig: PNode, m: var TCandidate) = matchesAux(c, n, nOrig, m, marker) proc matches*(c: PContext, n, nOrig: PNode, m: var TCandidate) = - if m.calleeSym != nil and m.calleeSym.magic == mArrGet: + if m.calleeSym != nil and m.calleeSym.magic in {mArrGet, mArrPut}: m.state = csMatch m.call = n return |