tests: cast C.AF_INET to u16 to avoid type error (#24933)

This commit is contained in:
Kim Shrier 2025-07-19 19:58:30 -06:00 committed by GitHub
parent d87b8c2627
commit e3b07d9ddc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,5 +13,5 @@ fn xint(n int) bool {
fn test_const() { fn test_const() {
assert xint(C.EOF) == true // a random libc const is int by default assert xint(C.EOF) == true // a random libc const is int by default
assert x16(C.AF_INET) == true // defined in V's net module assert x16(u16(C.AF_INET)) == true // defined in V's net module
} }