1
0
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:
Alexander Medvednikov 2020-06-07 19:06:19 +02:00
parent 30ade1d6ea
commit 3bbda7103f
3 changed files with 1 additions and 6 deletions

View File

@ -136,7 +136,7 @@ pub fn (mut p Parser) parse_type() table.Type {
if p.tok.kind != .lcbr {
pos := p.tok.position()
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)
}
}

View File

@ -1,4 +0,0 @@
fn C.some_c_function(int) void
fn main() {
println('ok')
}