From 276c08e7f729d400993e594dbe8a4bcb6eb5d111 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 28 Feb 2021 13:08:16 +0200 Subject: [PATCH] fmt: support static too --- vlib/v/parser/assign.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/parser/assign.v b/vlib/v/parser/assign.v index bd40981a40..499e9702b5 100644 --- a/vlib/v/parser/assign.v +++ b/vlib/v/parser/assign.v @@ -141,7 +141,7 @@ fn (mut p Parser) partial_assign_stmt(left []ast.Expr, left_comments []ast.Comme iv := lx.info as ast.IdentVar share = iv.share if iv.is_static { - if !p.pref.translated { + if !p.pref.translated && !p.pref.is_fmt { p.error_with_pos('static variables are supported only in -translated mode', lx.pos) return ast.Stmt{}