mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: remove unecessary assert (#9617)
This commit is contained in:
parent
a747651f18
commit
9541eb816b
@ -3577,7 +3577,6 @@ fn (mut c Checker) assert_stmt(node ast.AssertStmt) {
|
||||
|
||||
fn (mut c Checker) block(node ast.Block) {
|
||||
if node.is_unsafe {
|
||||
assert !c.inside_unsafe
|
||||
c.inside_unsafe = true
|
||||
c.stmts(node.stmts)
|
||||
c.inside_unsafe = false
|
||||
@ -5275,10 +5274,6 @@ pub fn (mut c Checker) lock_expr(mut node ast.LockExpr) ast.Type {
|
||||
}
|
||||
|
||||
pub fn (mut c Checker) unsafe_expr(mut node ast.UnsafeExpr) ast.Type {
|
||||
// assert !c.inside_unsafe
|
||||
if c.inside_unsafe {
|
||||
c.error('unsafe inside unsafe', node.pos)
|
||||
}
|
||||
c.inside_unsafe = true
|
||||
t := c.expr(node.expr)
|
||||
c.inside_unsafe = false
|
||||
|
Loading…
Reference in New Issue
Block a user