From 77a9eb4272a9b682982be55288d808352d341ff0 Mon Sep 17 00:00:00 2001 From: mertcandav Date: Fri, 27 Dec 2024 16:04:18 +0300 Subject: [PATCH] compiler: fix code generation for channel iterations --- src/julec/obj/cxx/scope.jule | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/julec/obj/cxx/scope.jule b/src/julec/obj/cxx/scope.jule index ead7a3b0d..47755326a 100644 --- a/src/julec/obj/cxx/scope.jule +++ b/src/julec/obj/cxx/scope.jule @@ -84,7 +84,8 @@ impl scopeCoder { writeExpr := fn() { // Write channel receive expression. // Use built-in expression for that. - // sb should be cleared already. + // sb should be cleared, make sure content is used already. + sb.Clear() if ref { sb.WriteByte('*')! }