mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
make "unreachable code" a warning in non-prod builds
This commit is contained in:
parent
1d90c1cbbf
commit
e0c6766a79
@ -1424,7 +1424,7 @@ fn (p mut Parser) gen(s string) {
|
||||
fn (p mut Parser) statement(add_semi bool) string {
|
||||
p.expected_type = ''
|
||||
if p.returns {
|
||||
p.error('unreachable code')
|
||||
p.warn_or_error('unreachable code')
|
||||
}
|
||||
// if !p.in_dispatch {
|
||||
p.cgen.is_tmp = false
|
||||
|
@ -76,6 +76,5 @@ fn get_user() ?User {
|
||||
|
||||
fn get_user_ptr() &User {
|
||||
return &User{
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user