Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions vlib/v/fmt/tests/anon_fn_result_return_with_comment_keep.vv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module main

pub interface Command {
name string // Command name as used on CLI
desc string // Single line description
help string // Detailed and formated description
arg_min int // Minimal argument number expected
arg_max int // Maximal argument number expected
exec fn (s []string) ! // Command callback.
}

fn main() {
println('Hello')
}
2 changes: 1 addition & 1 deletion vlib/v/parser/parse_type.v
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ fn (mut p Parser) parse_type() ast.Type {
is_attr := p.tok.kind == .at

if p.tok.line_nr > line_nr || p.tok.kind in [.comma, .rpar, .assign]
|| (is_attr || is_required_field) {
|| (is_attr || is_required_field) || p.tok.kind == .comment {
mut typ := ast.void_type
if is_option {
typ = typ.set_flag(.option)
Expand Down