1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: disallow comparison between enum and int (#7886)

This commit is contained in:
Swastik Baranwal
2021-01-08 22:11:52 +05:30
committed by GitHub
parent 46a5c487c1
commit 9291fb5e0c
24 changed files with 154 additions and 165 deletions

View File

@@ -105,7 +105,7 @@ fn (c Client) expect_reply(expected ReplyCode) ? {
if str.len >= 3 {
status := str[..3].int()
if status != expected {
if ReplyCode(status) != expected {
return error('Received unexpected status code $status, expecting $expected')
}
} else { return error('Recieved unexpected SMTP data: $str') }