diff --git a/compiler/semfold.nim b/compiler/semfold.nim index 2ab43a9c93..70276a6d41 100644 --- a/compiler/semfold.nim +++ b/compiler/semfold.nim @@ -435,7 +435,7 @@ proc evalOp(m: TMagic, n, a, b, c: PNode): PNode = mAppendStrStr, mAppendSeqElem, mSetLengthStr, mSetLengthSeq, mParseExprToAst, mParseStmtToAst, mExpandToAst, mTypeTrait, mDotDot, mNLen..mNError, mEqRef, mSlurp, mStaticExec, mNGenSym, mSpawn, - mParallel, mPlugin, mGetTypeInfo: + mParallel, mPlugin, mGetTypeInfo, mTypeOf: discard of mEqProc: result = newIntNodeT(ord( diff --git a/tests/typerel/typeof_in_template.nim b/tests/typerel/typeof_in_template.nim new file mode 100644 index 0000000000..9ec06f2e31 --- /dev/null +++ b/tests/typerel/typeof_in_template.nim @@ -0,0 +1,16 @@ +discard """ + output: '''@[a, c]''' +""" + +# bug #3230 + +import sequtils + +const + test_strings = ["a", "b", "c"] + +proc is_doc(x: string): bool = x == "b" + +let + tests = @test_strings.filter_it(not it.is_doc) +echo tests