Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Dec 2, 2023
1 parent edb21bb commit fe6e727
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vlib/v/checker/tests/wrong_option_type.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vlib/v/checker/tests/wrong_option_type.vv:1:10: error: wrong syntax, it must be ?int, not int?
1 | fn foo() int?{
| ~~~
2 | return 0
3 | }
3 changes: 3 additions & 0 deletions vlib/v/checker/tests/wrong_option_type.vv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn foo() int?{
return 0
}
5 changes: 5 additions & 0 deletions vlib/v/checker/tests/wrong_result_type.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vlib/v/checker/tests/wrong_result_type.vv:1:10: error: wrong syntax, it must be !int, not int!
1 | fn foo() int!{
| ~~~
2 | return 0
3 | }
3 changes: 3 additions & 0 deletions vlib/v/checker/tests/wrong_result_type.vv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn foo() int!{
return 0
}

0 comments on commit fe6e727

Please sign in to comment.