tests: add another test for 47f59d3

pull/6228/head
Delyan Angelov 2020-08-26 11:46:29 +03:00
parent 47f59d3fb6
commit 99dd72efea
2 changed files with 24 additions and 0 deletions

View File

@ -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 | }

View File

@ -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')
}