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

Can't pass array as function argument #57

Closed
pocket7878 opened this issue Apr 4, 2019 · 3 comments
Closed

Can't pass array as function argument #57

pocket7878 opened this issue Apr 4, 2019 · 3 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@pocket7878
Copy link

Hi!
I played playground, then found a bug.

Steps to reproduce:
Enter a program:

fn reverse(dummy []int) {
}

fn main() {
        arr := [1]
	println(reverse(arr))
}
  1. Run
  2. Then I got an error message:
You just found a bug. V can't compile this program, but it should. Please create a GitHub issue.
@medvednikov
Copy link
Member

Hi

Functions need to return values, there's no error message for that right now, I'll fix it today.

@medvednikov
Copy link
Member

fn reverse(dummy []int) []int {

@medvednikov
Copy link
Member

Fixed.

Larpon pushed a commit to Larpon/v that referenced this issue Feb 24, 2022
@medvednikov medvednikov added the Bug This tag is applied to issues which reports bugs. label Jul 19, 2022
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
Development

No branches or pull requests

2 participants