diff --git a/vlib/toml/checker/checker.v b/vlib/toml/checker/checker.v index 9eef5944aa..6c96688aeb 100644 --- a/vlib/toml/checker/checker.v +++ b/vlib/toml/checker/checker.v @@ -118,8 +118,7 @@ fn (c Checker) check_number(num ast.Number) ? { return error(@MOD + '.' + @STRUCT + '.' + @FN + ' numbers like "$lit" (hex, octal and binary) can not start with `$ascii` in ...${c.excerpt(num.pos)}...') } - // is_first_digit = byte(lit_sans_sign[0]).is_digit() - if lit.len > 1 && lit_sans_sign.starts_with('0') { + if lit.len > 1 && lit_sans_sign.starts_with('0') && !lit_sans_sign.starts_with('0.') { ascii = byte(lit_sans_sign[0]).ascii_str() return error(@MOD + '.' + @STRUCT + '.' + @FN + ' numbers like "$lit" can not start with `$ascii` in ...${c.excerpt(num.pos)}...') diff --git a/vlib/toml/tests/iarna.toml-spec-tests_test.v b/vlib/toml/tests/iarna.toml-spec-tests_test.v index 7789c30c1d..11b85707ab 100644 --- a/vlib/toml/tests/iarna.toml-spec-tests_test.v +++ b/vlib/toml/tests/iarna.toml-spec-tests_test.v @@ -15,7 +15,6 @@ const ( // Kept for easier handling of future updates to the tests valid_exceptions = [ - 'values/spec-float-3.toml', 'values/spec-float-10.toml', 'values/spec-float-11.toml', 'values/spec-float-12.toml',