mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
use the new &C.Foo(0) cast
This commit is contained in:
@ -488,6 +488,7 @@ fn (p mut Parser) gen_struct_init(typ string, t Type) bool {
|
||||
// TODO tmp hack for 0 pointers init
|
||||
// &User{!} ==> 0
|
||||
if p.tok == .not {
|
||||
p.warn('use `$t.name(0)` instead of `&$t.name{!}`')
|
||||
p.next()
|
||||
p.gen('0')
|
||||
p.check(.rcbr)
|
||||
|
Reference in New Issue
Block a user