mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
Merge 96e9c7831f
into a8d200ac0e
This commit is contained in:
commit
07a9af4336
2 changed files with 8 additions and 1 deletions
|
@ -59,7 +59,7 @@ fn main() {
|
||||||
mut app := &App{
|
mut app := &App{
|
||||||
buf: [][]int{len: height - 1, init: []int{len: width}}
|
buf: [][]int{len: height - 1, init: []int{len: width}}
|
||||||
}
|
}
|
||||||
app.buf << []int{len: width, init: 36} // white fire base
|
app.buf << [[]int{len: width, init: 36}] // white fire base
|
||||||
|
|
||||||
app.gg = gg.new_context(
|
app.gg = gg.new_context(
|
||||||
event_fn: event
|
event_fn: event
|
||||||
|
|
|
@ -71,6 +71,13 @@ fn (mut c Checker) infix_expr(mut node ast.InfixExpr) ast.Type {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if mut node.right is ast.ArrayInit {
|
||||||
|
if node.right.exprs.len == 0 {
|
||||||
|
// handle arr << [] where [] is empty
|
||||||
|
info := c.table.sym(left_type).array_info()
|
||||||
|
node.right.elem_type = info.elem_type
|
||||||
|
c.expected_type = info.elem_type
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut right_type := c.expr(mut node.right)
|
mut right_type := c.expr(mut node.right)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue