| 1 | // operator == |
| 2 | comptime { |
| 3 | const a: i64 = undefined; |
| 4 | var x: i32 = 0; |
| 5 | if (a == a) x += 1; |
| 6 | } |
| 7 | // operator != |
| 8 | comptime { |
| 9 | const a: i64 = undefined; |
| 10 | var x: i32 = 0; |
| 11 | if (a != a) x += 1; |
| 12 | } |
| 13 | // operator > |
| 14 | comptime { |
| 15 | const a: i64 = undefined; |
| 16 | var x: i32 = 0; |
| 17 | if (a > a) x += 1; |
| 18 | } |
| 19 | // operator < |
| 20 | comptime { |
| 21 | const a: i64 = undefined; |
| 22 | var x: i32 = 0; |
| 23 | if (a < a) x += 1; |
| 24 | } |
| 25 | // operator >= |
| 26 | comptime { |
| 27 | const a: i64 = undefined; |
| 28 | var x: i32 = 0; |
| 29 | if (a >= a) x += 1; |
| 30 | } |
| 31 | // operator <= |
| 32 | comptime { |
| 33 | const a: i64 = undefined; |
| 34 | var x: i32 = 0; |
| 35 | if (a <= a) x += 1; |
| 36 | } |
| 37 | |
| 38 | // error |
| 39 | // |
| 40 | // :5:11: error: use of undefined value here causes illegal behavior |
| 41 | // :11:11: error: use of undefined value here causes illegal behavior |
| 42 | // :17:11: error: use of undefined value here causes illegal behavior |
| 43 | // :23:11: error: use of undefined value here causes illegal behavior |
| 44 | // :29:11: error: use of undefined value here causes illegal behavior |
| 45 | // :35:11: error: use of undefined value here causes illegal behavior |