From e9affe33ced071bddfde8c6d669ff6bb4b7bda71 Mon Sep 17 00:00:00 2001 From: Lukas Neubert Date: Fri, 25 Dec 2020 18:03:03 +0100 Subject: [PATCH] ast: fix C error for scope's .str() method (#7561) --- vlib/v/ast/scope.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/ast/scope.v b/vlib/v/ast/scope.v index 82420abb97..3b70e0538d 100644 --- a/vlib/v/ast/scope.v +++ b/vlib/v/ast/scope.v @@ -181,7 +181,7 @@ fn (s &Scope) contains(pos int) bool { return pos >= s.start_pos && pos <= s.end_pos } -pub fn (sc &Scope) show(depth int, max_depth int) string { +pub fn (sc Scope) show(depth int, max_depth int) string { mut out := '' mut indent := '' for _ in 0 .. depth * 4 { @@ -206,6 +206,6 @@ pub fn (sc &Scope) show(depth int, max_depth int) string { return out } -pub fn (sc &Scope) str() string { +pub fn (sc Scope) str() string { return sc.show(0, 0) }