Fix decl c struct follow a v struct

struct C.CURL

struct Curl {
    h *C.CURL
}
pull/1049/head
drswinghead 2019-06-24 00:08:09 +08:00 committed by Alexander Medvednikov
parent 6cb5eee1b2
commit 7ca00c8f5e
1 changed files with 1 additions and 1 deletions

View File

@ -422,7 +422,7 @@ fn (p mut Parser) struct_decl() {
}
}
// 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 {`')
}
// Register the type