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

"bad" error message for unterminated println #21100

Closed
JalonSolov opened this issue Mar 25, 2024 · 0 comments · Fixed by #21110
Closed

"bad" error message for unterminated println #21100

JalonSolov opened this issue Mar 25, 2024 · 0 comments · Fixed by #21110
Assignees
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@JalonSolov
Copy link
Contributor

JalonSolov commented Mar 25, 2024

Describe the bug

If you forget the closing ) on a println call, V tells you there is a missing comma.

This is incorrect, since println only takes a single parameter, not a comma-separated list.

Unknown if this is happening with other single parameter functions, but likely.

Reproduction Steps

Filename: x.v

import os

println(os.file_last_mod_unix('x.v')

Try to run it with v run x.v

Expected Behavior

An error message stating that the final closing ) is missing.

Current Behavior

x.v:4:1: error: unexpected eof, expecting `,`
    2 | 
    3 | println(os.file_last_mod_unix('x.v')

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.5 b01e091

Environment details (OS name and version, etc.)

V full version: V 0.4.5 efa98d9.b01e091
OS: linux, "Manjaro Linux"
Processor: 32 cpus, 64bit, little endian, AMD Ryzen 9 7950X 16-Core Processor

getwd: /home/jalon
vexe: /home/jalon/git/v/v
vexe mtime: 2024-03-25 14:04:33

vroot: OK, value: /home/jalon/git/v
VMODULES: OK, value: /home/jalon/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.44.0
Git vroot status: weekly.2024.13-8-gb01e0914
.git/config present: true

CC version: cc (GCC) 13.2.1 20230801
thirdparty/tcc status: thirdparty-linux-amd64 40e5cbb5

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
Bug This tag is applied to issues which reports bugs.
Projects
None yet
2 participants