2020-09-18 00:58:54 +02:00
|
|
|
vlib/v/checker/tests/unnecessary_parenthesis.vv:2:2: error: unnecessary `()` in `if` condition, use `if expr {` instead of `if (expr) {`.
|
2020-05-01 14:46:12 +02:00
|
|
|
1 | fn main() {
|
|
|
|
2 | if (1 == 1) {
|
|
|
|
| ~~~~~~~~~~~
|
|
|
|
3 | println('yeay')
|
|
|
|
4 | } else if (1 == 2) {
|
2020-09-18 00:58:54 +02:00
|
|
|
vlib/v/checker/tests/unnecessary_parenthesis.vv:4:4: error: unnecessary `()` in `if` condition, use `if expr {` instead of `if (expr) {`.
|
2020-05-01 14:46:12 +02:00
|
|
|
2 | if (1 == 1) {
|
|
|
|
3 | println('yeay')
|
|
|
|
4 | } else if (1 == 2) {
|
|
|
|
| ~~~~~~~~~~~~~~~~
|
|
|
|
5 | println("oh no :'(")
|
|
|
|
6 | } else if (1 == 3) {
|
2020-09-18 00:58:54 +02:00
|
|
|
vlib/v/checker/tests/unnecessary_parenthesis.vv:6:4: error: unnecessary `()` in `if` condition, use `if expr {` instead of `if (expr) {`.
|
2020-05-01 14:46:12 +02:00
|
|
|
4 | } else if (1 == 2) {
|
|
|
|
5 | println("oh no :'(")
|
|
|
|
6 | } else if (1 == 3) {
|
|
|
|
| ~~~~~~~~~~~~~~~~
|
|
|
|
7 | println("what's wrong with physics ????")
|
|
|
|
8 | }
|