1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

&C.Foo(0) cast to replace &C.Foo{!} hack

This commit is contained in:
Alexander Medvednikov
2019-12-04 02:52:32 +03:00
parent a9aaa13a09
commit 2bafd41183
3 changed files with 23 additions and 4 deletions

View File

@ -507,6 +507,8 @@ fn (p mut Parser) gen_empty_map(typ string) {
}
fn (p mut Parser) cast(typ string) {
p.gen('(')
defer { p.gen(')') }
p.next()
pos := p.cgen.add_placeholder()
if p.tok == .rpar {