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

Code generation error for using a protobuf value as map key #1

Closed
psybers opened this issue Nov 16, 2015 · 0 comments
Closed

Code generation error for using a protobuf value as map key #1

psybers opened this issue Nov 16, 2015 · 0 comments
Labels

Comments

@psybers
Copy link
Member

psybers commented Nov 16, 2015

The code generation strategy for storing into a map is currently broken. If the key is complex and contains getting values from a protobuf field, it breaks. This is not a problem if the value being stored is a protobuf field, only if the key is.

Here is a simple test case to trigger the error:

o: output sum of int;
o << 1;

committers: map[string] of bool;

foreach (i: int; def(input.code_repositories[i]))
    committers[input.code_repositories[i].url] = true;

And here is the output:

Bug.java:140: error: illegal start of expression
___committers.put(_input.getCodeRepositoriesList().get(___i)).getUrl(, true);}
                                                                     ^
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

1 participant