From 094d71cb6f6fbdedfd43a2bc6c66b227aedf1ddf Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 5 May 2019 12:20:33 +0200 Subject: fixes #11175 --- compiler/semexprs.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 0d81cab37..cb52724b9 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1927,7 +1927,9 @@ proc processQuotations(c: PContext; n: var PNode, op: string, processQuotations(c, n.sons[i], op, quotes, ids) proc semQuoteAst(c: PContext, n: PNode): PNode = - internalAssert c.config, n.len == 2 or n.len == 3 + if n.len != 2 and n.len != 3: + localError(c.config, n.info, "'quote' expects 1 or 2 arguments") + return n # We transform the do block into a template with a param for # each interpolation. We'll pass this template to getAst. var -- cgit 1.4.1-2-gfad0