From 3558e05bfb6f5a1607bf60dd503786a90c1fdbc3 Mon Sep 17 00:00:00 2001 From: yuyi Date: Tue, 27 Jun 2023 15:53:35 +0800 Subject: [PATCH] tests: fix reflection_sym_test.v (#18574) --- doc/docs.md | 2 +- vlib/v/parser/fn.v | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 6a0372da66..dfd119abb0 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -2438,7 +2438,7 @@ V now supports static type methods like `User.new()`. These are defined on a str `fn [Type name].[function name]` and allow to organize all functions related to a struct: ```v oksyntax -struct User { } +struct User {} fn User.new() User { return User{} diff --git a/vlib/v/parser/fn.v b/vlib/v/parser/fn.v index 76bff1a659..b71c26d699 100644 --- a/vlib/v/parser/fn.v +++ b/vlib/v/parser/fn.v @@ -536,7 +536,7 @@ run them via `v file.v` instead', is_keep_alive: is_keep_alive is_method: false is_static_type_method: is_static_type_method - receiver_type: rec.typ // used only if is static type method + receiver_type: if is_static_type_method { rec.typ } else { 0 } // used only if is static type method is_file_translated: p.is_translated // attrs: p.attrs