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

Error message unrelated to the problem #20049

Closed
Eliyaan opened this issue Nov 30, 2023 · 0 comments · Fixed by #20061
Closed

Error message unrelated to the problem #20049

Eliyaan opened this issue Nov 30, 2023 · 0 comments · Fixed by #20061
Labels
Bug This tag is applied to issues which reports bugs. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones).

Comments

@Eliyaan
Copy link
Contributor

Eliyaan commented Nov 30, 2023

Describe the bug

The error message is unrelated to the problem.

Reproduction Steps

fn foo() int!{
	return 0
}

Expected Behavior

To tell that the problem comes from the ! after the return type.

Current Behavior

new2.v:2:2: error: invalid expression: unexpected keyword `return`
    1 | fn foo() int!{
    2 |     return 0
      |     ~~~~~~
    3 | }

V version

V 0.4.3 afaeb74

Environment details (OS name and version, etc.)

V full version: V 0.4.3 536bf21.afaeb74
OS: windows, Microsoft Windows 10 Education v19045 64 bits

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.

@Eliyaan Eliyaan added the Bug This tag is applied to issues which reports bugs. label Nov 30, 2023
@felipensp felipensp added the Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones). label Dec 1, 2023
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. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants