v2 / vlib / v / checker / tests / checker_comparison_between_obj_and_int.vv
14 lines · 11 sloc · 193 bytes · 17bba712bd950294387220f87d3456f37b388161
Raw
1struct Foo {}
2
3// inside a unsafe block it is valid
4fn insert_helper_unsafe(mut node Foo) {
5 if unsafe { node == 0 } {
6 }
7}
8
9fn insert_helper(mut node Foo) {
10 if node == 0 {
11 }
12}
13
14fn main() {}
15