From 99dd72efea502447f941ba8ff6fe7a4b319b0e62 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 26 Aug 2020 11:46:29 +0300 Subject: [PATCH] tests: add another test for 47f59d3 --- ...error_with_several_comments_with_crlf_ending.out | 13 +++++++++++++ .../error_with_several_comments_with_crlf_ending.vv | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.out create mode 100644 vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.vv diff --git a/vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.out b/vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.out new file mode 100644 index 0000000000..883c3e919b --- /dev/null +++ b/vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.out @@ -0,0 +1,13 @@ +vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.vv:9:2: error: undefined ident: `a` (use `:=` to assign a variable) + 7 | fn main() { + 8 | func1() + 9 | a = 2 + | ^ + 10 | println('a is $a') + 11 | } +vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.vv:10:17: error: undefined ident: `a` + 8 | func1() + 9 | a = 2 + 10 | println('a is $a') + | ^ + 11 | } diff --git a/vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.vv b/vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.vv new file mode 100644 index 0000000000..09b22be32f --- /dev/null +++ b/vlib/v/checker/tests/error_with_several_comments_with_crlf_ending.vv @@ -0,0 +1,11 @@ +// Comment line 1 +// Comment line 2 +fn func1() { + println('Inside func 1') +} + +fn main() { + func1() + a = 2 + println('a is $a') +}