mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: disallow statements after a return, branch check $if, $else, switch, and loops correctly
This commit is contained in:
committed by
Alexander Medvednikov
parent
58b52aa9fb
commit
1864e92ff4
@@ -77,7 +77,6 @@ pub fn (a mut array) sort_with_compare(compare voidptr) {
|
||||
pub fn (a mut array) insert(i int, val voidptr) {
|
||||
if i >= a.len {
|
||||
panic('array.insert: index larger than length')
|
||||
return
|
||||
}
|
||||
a._push(val)
|
||||
size := a.element_size
|
||||
|
||||
Reference in New Issue
Block a user