mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Revert "parser: allow void return type for C functions"
This reverts commit d7c63922d5
.
This commit is contained in:
@ -136,7 +136,7 @@ pub fn (mut p Parser) parse_type() table.Type {
|
|||||||
if p.tok.kind != .lcbr {
|
if p.tok.kind != .lcbr {
|
||||||
pos := p.tok.position()
|
pos := p.tok.position()
|
||||||
typ = p.parse_any_type(language, nr_muls > 0)
|
typ = p.parse_any_type(language, nr_muls > 0)
|
||||||
if typ == table.void_type && is_optional {
|
if typ == table.void_type {
|
||||||
p.error_with_pos('use `?` instead of `?void`', pos)
|
p.error_with_pos('use `?` instead of `?void`', pos)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
ok
|
|
@ -1,4 +0,0 @@
|
|||||||
fn C.some_c_function(int) void
|
|
||||||
fn main() {
|
|
||||||
println('ok')
|
|
||||||
}
|
|
Reference in New Issue
Block a user