From 689be25a8931d364c8b6d05fb2ea9af2d90f253a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Sun, 21 Aug 2022 16:16:47 +0200 Subject: [PATCH] Cover ASTNode.String() nil ptr edgecase --- pkg/ql/ast_nodes.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/ql/ast_nodes.go b/pkg/ql/ast_nodes.go index 9e6ab7ebc..af67c19a1 100644 --- a/pkg/ql/ast_nodes.go +++ b/pkg/ql/ast_nodes.go @@ -35,6 +35,10 @@ type ( ) func (n *ASTNode) String() string { + if n == nil { + return "" + } + // Leaf edge-cases switch { case n.Symbol != "":