From 7f66e33290a7daf66358fe9ba607f1b78857c645 Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 17 Jul 2023 18:40:08 +0200 Subject: Fix compilation on nim 1.6.10 It appears there is a compiler bug we have to work around there. --- src/html/htmlparser.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/html/htmlparser.nim') diff --git a/src/html/htmlparser.nim b/src/html/htmlparser.nim index 08e30257..0791a3af 100644 --- a/src/html/htmlparser.nim +++ b/src/html/htmlparser.nim @@ -2718,9 +2718,10 @@ proc parseHTML*[Handle](inputStream: Stream, dombuilder: DOMBuilder[Handle], else: DECODER_ERROR_MODE_FATAL let decoder = newDecoderStream(inputStream, parser.charset, errormode = em) + proc x(e: ParseError) = + parser.parseError(e) let onParseError = if parser.hasParseError(): - proc(e: ParseError) = - parser.parseError(e) + x else: nil parser.tokenizer = newTokenizer(decoder, onParseError) -- cgit 1.4.1-2-gfad0