mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: allow EnumName(number) casts only inside unsafe{} blocks (#15932)
This commit is contained in:
@@ -158,7 +158,7 @@ fn (mut c Client) expect_reply(expected ReplyCode) ? {
|
||||
|
||||
if str.len >= 3 {
|
||||
status := str[..3].int()
|
||||
if ReplyCode(status) != expected {
|
||||
if unsafe { ReplyCode(status) } != expected {
|
||||
return error('Received unexpected status code $status, expecting $expected')
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user