Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
v4
/
vlib
/
v
/
checker
/
tests
/
infix_value_ref_comparison_err.vv
20
lines
·
17
sloc
·
243 bytes
·
1f5df6f827d46728321ed9fec3fe7d53c7b9df04
Raw
1
type Abc = int | string
2
3
fn plain_value_ref_comparison() {
4
value := 1
5
reference := &value
6
_ = value == reference
7
}
8
9
fn sumtype_value_ref_comparison() {
10
b := 1
11
a := Abc(b)
12
match a {
13
int {
14
_ = a == &b
15
}
16
else {}
17
}
18
}
19
20
fn main() {}
21