Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone brace block containing only literals #21436

Open
infdivzero opened this issue May 5, 2024 · 0 comments
Open

Standalone brace block containing only literals #21436

infdivzero opened this issue May 5, 2024 · 0 comments

Comments

@infdivzero
Copy link

infdivzero commented May 5, 2024

V doctor:

V full version: V 0.4.5 387af74.a1f3624
OS: linux, "Gentoo Linux"
Processor: 4 cpus, 64bit, little endian, AMD Ryzen 3 3200G with Radeon Vega Graphics

getwd: /home/stew/Projects/vtech
vexe: /home/stew/Gitclones/tools/v/v
vexe mtime: 2024-05-05 17:59:50

vroot: OK, value: /home/stew/Gitclones/tools/v
VMODULES: OK, value: /home/stew/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.43.0
Git vroot status: weekly.2024.18.2-19-ga1f36240
.git/config present: true

CC version: cc (Gentoo 13.2.1_p20240113-r1 p12) 13.2.1 20240113
thirdparty/tcc: N/A

What did you do?
v -g -o vdbg cmd/v && vdbg src/main.v

fn main() {
  {1, 2, 3, 4}
  println("works")
}

What did you expect to see?

Syntax error? The code is unusual, and from what I've been reading in the docs so far, functions require a return statement when returning things instead of just dropping them like in rust. The main() function doesn't even have a return type.

What did you see instead?

works

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant