1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ast: fix C error for scope's .str() method (#7561)

This commit is contained in:
Lukas Neubert 2020-12-25 18:03:03 +01:00 committed by GitHub
parent 9b19388402
commit e9affe33ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}