mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Fix decl c struct follow a v struct
struct C.CURL struct Curl { h *C.CURL }
This commit is contained in:
parent
6cb5eee1b2
commit
7ca00c8f5e
@ -422,7 +422,7 @@ fn (p mut Parser) struct_decl() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// V used to have 'type Foo struct', many Go users might use this syntax
|
// V used to have 'type Foo struct', many Go users might use this syntax
|
||||||
if p.tok == STRUCT {
|
if !is_c && p.tok == STRUCT {
|
||||||
p.error('use `struct $name {` instead of `type $name struct {`')
|
p.error('use `struct $name {` instead of `type $name struct {`')
|
||||||
}
|
}
|
||||||
// Register the type
|
// Register the type
|
||||||
|
Loading…
Reference in New Issue
Block a user