From 604f19adba3021bedbff1c647c36dfa38c97b9e9 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 27 Oct 2022 11:08:32 +0300 Subject: [PATCH] scanner: `:` str inter fix --- vlib/v/scanner/scanner.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/scanner/scanner.v b/vlib/v/scanner/scanner.v index c38a38f8bc..04299462aa 100644 --- a/vlib/v/scanner/scanner.v +++ b/vlib/v/scanner/scanner.v @@ -1240,7 +1240,7 @@ fn (mut s Scanner) ident_string() string { // No } in this string, so it's not a valid `{x}` interpolation break } - if s.text[i] in [`=`, `\n`, s.inter_quote] { + if s.text[i] in [`=`, `:`, `\n`, s.inter_quote] { // We reached the end of the line or string without reaching "}". // Also if there's "=", there's no way it's a valid interpolation expression: // e.g. `println("{a.b = 42}")`