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

struct array initialization fails #264

Closed
yulvil opened this issue Oct 23, 2017 · 2 comments
Closed

struct array initialization fails #264

yulvil opened this issue Oct 23, 2017 · 2 comments
Labels

Comments

@yulvil
Copy link
Contributor

yulvil commented Oct 23, 2017

currently transpiles to: var a []interface {} = []interface{}{nil, nil}

void test_structarr()
{
    struct s {
        int i;
        char c;
    };
 
    struct s a[] = {{1, 'a'}, {2, 'b'}};
    is_eq(a[0].i, 1);
    is_eq(a[0].c, 'a');
    is_eq(a[1].i, 2);
    is_eq(a[1].c, 'b');
}
@yulvil
Copy link
Contributor Author

yulvil commented Oct 26, 2017

I am working on this one and will soon have a fix.

@yulvil
Copy link
Contributor Author

yulvil commented Oct 30, 2017

@elliotchance The code is merged into master. Closing.

@yulvil yulvil closed this as completed Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants