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 for missing function return type could be better #869

Closed
Dubhead opened this issue Mar 30, 2018 · 1 comment
Closed

error message for missing function return type could be better #869

Dubhead opened this issue Mar 30, 2018 · 1 comment

Comments

@Dubhead
Copy link
Contributor

Dubhead commented Mar 30, 2018

$ cat -n main.zig
     1	fn foo() { // missing the return type
     2	    bar();
     3	}
     4	
     5	fn bar() void {
     6	    //
     7	}
     8	
     9	pub fn main() void {
    10	    foo();
    11	}
$ zig build-exe main.zig
/home/miura/work/foo/main.zig:5:1: error: expected token '{', found 'fn'
fn bar() void {
^
$ 

Something like main.zig:1:11: error: missing type would be better.

@andrewrk
Copy link
Member

This is #760. I'm not sure what the solution is yet.

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

2 participants