diff --git a/compiler/scanner.v b/compiler/scanner.v index 44a6fb165c..a93d832202 100644 --- a/compiler/scanner.v +++ b/compiler/scanner.v @@ -146,6 +146,9 @@ fn (s mut Scanner) ident_dec_number() string { for s.pos < s.text.len && s.text[s.pos].is_digit() { s.pos++ } + if !s.inside_string && s.pos < s.text.len && s.text[s.pos] == `f` { + s.error('no `f` is needed for floats') + } } // scan exponential part