| 1 | vlib/v/checker/tests/shift_ops_expressions.vv:4:2: notice: shifting a value from a signed type `int` can change the sign |
| 2 | 2 | mut a := 12 |
| 3 | 3 | mut arr := []int{} |
| 4 | 4 | a << 1 |
| 5 | | ^ |
| 6 | 5 | if true { |
| 7 | 6 | a << 2 |
| 8 | vlib/v/checker/tests/shift_ops_expressions.vv:5:5: notice: condition is always true |
| 9 | 3 | mut arr := []int{} |
| 10 | 4 | a << 1 |
| 11 | 5 | if true { |
| 12 | | ~~~~ |
| 13 | 6 | a << 2 |
| 14 | 7 | } |
| 15 | vlib/v/checker/tests/shift_ops_expressions.vv:6:3: notice: shifting a value from a signed type `int` can change the sign |
| 16 | 4 | a << 1 |
| 17 | 5 | if true { |
| 18 | 6 | a << 2 |
| 19 | | ^ |
| 20 | 7 | } |
| 21 | 8 | c := if true { a << 111 } else { a << 333 } |
| 22 | vlib/v/checker/tests/shift_ops_expressions.vv:8:10: notice: condition is always true |
| 23 | 6 | a << 2 |
| 24 | 7 | } |
| 25 | 8 | c := if true { a << 111 } else { a << 333 } |
| 26 | | ~~~~ |
| 27 | 9 | println(c) |
| 28 | 10 | a << 1 |
| 29 | vlib/v/checker/tests/shift_ops_expressions.vv:8:17: notice: shifting a value from a signed type `int` can change the sign |
| 30 | 6 | a << 2 |
| 31 | 7 | } |
| 32 | 8 | c := if true { a << 111 } else { a << 333 } |
| 33 | | ^ |
| 34 | 9 | println(c) |
| 35 | 10 | a << 1 |
| 36 | vlib/v/checker/tests/shift_ops_expressions.vv:10:2: notice: shifting a value from a signed type `int` can change the sign |
| 37 | 8 | c := if true { a << 111 } else { a << 333 } |
| 38 | 9 | println(c) |
| 39 | 10 | a << 1 |
| 40 | | ^ |
| 41 | 11 | println(a) |
| 42 | 12 | 5 << 9 |
| 43 | vlib/v/checker/tests/shift_ops_expressions.vv:20:5: notice: condition is always true |
| 44 | 18 | // |
| 45 | 19 | arr << 1 |
| 46 | 20 | if true { |
| 47 | | ~~~~ |
| 48 | 21 | arr << 2 |
| 49 | 22 | } |
| 50 | vlib/v/checker/tests/shift_ops_expressions.vv:23:10: notice: condition is always true |
| 51 | 21 | arr << 2 |
| 52 | 22 | } |
| 53 | 23 | d := if true { |
| 54 | | ~~~~ |
| 55 | 24 | arr << 111 |
| 56 | 25 | 777 |
| 57 | vlib/v/checker/tests/shift_ops_expressions.vv:32:10: notice: condition is always true |
| 58 | 30 | println(d) |
| 59 | 31 | // |
| 60 | 32 | x := if true { |
| 61 | | ~~~~ |
| 62 | 33 | a << 1 |
| 63 | 34 | 999 |
| 64 | vlib/v/checker/tests/shift_ops_expressions.vv:33:3: notice: shifting a value from a signed type `int` can change the sign |
| 65 | 31 | // |
| 66 | 32 | x := if true { |
| 67 | 33 | a << 1 |
| 68 | | ^ |
| 69 | 34 | 999 |
| 70 | 35 | } else { |
| 71 | vlib/v/checker/tests/shift_ops_expressions.vv:37:3: notice: shifting a value from a signed type `int` can change the sign |
| 72 | 35 | } else { |
| 73 | 36 | println('---') |
| 74 | 37 | a << 9999 |
| 75 | | ^ |
| 76 | 38 | println('---') |
| 77 | 39 | 555 |
| 78 | vlib/v/checker/tests/shift_ops_expressions.vv:47:5: notice: condition is always true |
| 79 | 45 | mut rr := 12 |
| 80 | 46 | rr >> 1 |
| 81 | 47 | if true { |
| 82 | | ~~~~ |
| 83 | 48 | rr >> 2 |
| 84 | 49 | } |
| 85 | vlib/v/checker/tests/shift_ops_expressions.vv:50:10: notice: condition is always true |
| 86 | 48 | rr >> 2 |
| 87 | 49 | } |
| 88 | 50 | c := if true { rr >> 111 } else { rr >> 333 } |
| 89 | | ~~~~ |
| 90 | 51 | println(c) |
| 91 | 52 | rr >> 1 |
| 92 | vlib/v/checker/tests/shift_ops_expressions.vv:61:10: notice: condition is always true |
| 93 | 59 | } |
| 94 | 60 | // |
| 95 | 61 | x := if true { |
| 96 | | ~~~~ |
| 97 | 62 | rr >> 1 |
| 98 | 63 | 999 |
| 99 | vlib/v/checker/tests/shift_ops_expressions.vv:4:2: error: unused expression |
| 100 | 2 | mut a := 12 |
| 101 | 3 | mut arr := []int{} |
| 102 | 4 | a << 1 |
| 103 | | ~~~~~~ |
| 104 | 5 | if true { |
| 105 | 6 | a << 2 |
| 106 | vlib/v/checker/tests/shift_ops_expressions.vv:6:3: error: unused expression |
| 107 | 4 | a << 1 |
| 108 | 5 | if true { |
| 109 | 6 | a << 2 |
| 110 | | ~~~~~~ |
| 111 | 7 | } |
| 112 | 8 | c := if true { a << 111 } else { a << 333 } |
| 113 | vlib/v/checker/tests/shift_ops_expressions.vv:8:22: error: shift count for type `int` too large (maximum: 31 bits) |
| 114 | 6 | a << 2 |
| 115 | 7 | } |
| 116 | 8 | c := if true { a << 111 } else { a << 333 } |
| 117 | | ~~~ |
| 118 | 9 | println(c) |
| 119 | 10 | a << 1 |
| 120 | vlib/v/checker/tests/shift_ops_expressions.vv:10:2: error: unused expression |
| 121 | 8 | c := if true { a << 111 } else { a << 333 } |
| 122 | 9 | println(c) |
| 123 | 10 | a << 1 |
| 124 | | ~~~~~~ |
| 125 | 11 | println(a) |
| 126 | 12 | 5 << 9 |
| 127 | vlib/v/checker/tests/shift_ops_expressions.vv:12:2: error: unused expression |
| 128 | 10 | a << 1 |
| 129 | 11 | println(a) |
| 130 | 12 | 5 << 9 |
| 131 | | ~~~~~~ |
| 132 | 13 | for i in 0 .. 10 { |
| 133 | 14 | z := i << 5 |
| 134 | vlib/v/checker/tests/shift_ops_expressions.vv:15:3: error: unused expression |
| 135 | 13 | for i in 0 .. 10 { |
| 136 | 14 | z := i << 5 |
| 137 | 15 | i << 5 |
| 138 | | ~~~~~~ |
| 139 | 16 | println(z) |
| 140 | 17 | } |
| 141 | vlib/v/checker/tests/shift_ops_expressions.vv:33:3: error: unused expression |
| 142 | 31 | // |
| 143 | 32 | x := if true { |
| 144 | 33 | a << 1 |
| 145 | | ~~~~~~ |
| 146 | 34 | 999 |
| 147 | 35 | } else { |
| 148 | vlib/v/checker/tests/shift_ops_expressions.vv:37:8: error: shift count for type `int` too large (maximum: 31 bits) |
| 149 | 35 | } else { |
| 150 | 36 | println('---') |
| 151 | 37 | a << 9999 |
| 152 | | ~~~~ |
| 153 | 38 | println('---') |
| 154 | 39 | 555 |
| 155 | vlib/v/checker/tests/shift_ops_expressions.vv:37:3: error: unused expression |
| 156 | 35 | } else { |
| 157 | 36 | println('---') |
| 158 | 37 | a << 9999 |
| 159 | | ~~~~~~~~~ |
| 160 | 38 | println('---') |
| 161 | 39 | 555 |
| 162 | vlib/v/checker/tests/shift_ops_expressions.vv:50:23: error: shift count for type `int` too large (maximum: 31 bits) |
| 163 | 48 | rr >> 2 |
| 164 | 49 | } |
| 165 | 50 | c := if true { rr >> 111 } else { rr >> 333 } |
| 166 | | ~~~ |
| 167 | 51 | println(c) |
| 168 | 52 | rr >> 1 |
| 169 | vlib/v/checker/tests/shift_ops_expressions.vv:66:9: error: shift count for type `int` too large (maximum: 31 bits) |
| 170 | 64 | } else { |
| 171 | 65 | println('---') |
| 172 | 66 | rr >> 9999 |
| 173 | | ~~~~ |
| 174 | 67 | println('---') |
| 175 | 68 | 555 |
| 176 | |