make "unreachable code" a warning in non-prod builds
parent
1d90c1cbbf
commit
e0c6766a79
|
@ -1424,7 +1424,7 @@ fn (p mut Parser) gen(s string) {
|
||||||
fn (p mut Parser) statement(add_semi bool) string {
|
fn (p mut Parser) statement(add_semi bool) string {
|
||||||
p.expected_type = ''
|
p.expected_type = ''
|
||||||
if p.returns {
|
if p.returns {
|
||||||
p.error('unreachable code')
|
p.warn_or_error('unreachable code')
|
||||||
}
|
}
|
||||||
// if !p.in_dispatch {
|
// if !p.in_dispatch {
|
||||||
p.cgen.is_tmp = false
|
p.cgen.is_tmp = false
|
||||||
|
|
|
@ -76,6 +76,5 @@ fn get_user() ?User {
|
||||||
|
|
||||||
fn get_user_ptr() &User {
|
fn get_user_ptr() &User {
|
||||||
return &User{
|
return &User{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue