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

Mismatch arguments in Stream header and c files #396

Closed
PhucVH888 opened this issue Apr 25, 2016 · 3 comments
Closed

Mismatch arguments in Stream header and c files #396

PhucVH888 opened this issue Apr 25, 2016 · 3 comments

Comments

@PhucVH888
Copy link
Contributor

It’s quite strange as there is not any error with 2 styles of embedded functions.

embed (Stream b) stream_mk(); end
embed (Stream b) stream_mk(encore_ctx()); end

Normally, it will raise the error message when the arguments do not match.
It could be the mismatch between header and c files.
stream.h

stream_t *stream_mk();

stream.c

stream_t *stream_mk(pony_ctx_t *ctx){…}
@PhucVH888 PhucVH888 added the bug label Apr 25, 2016
@PhucVH888
Copy link
Contributor Author

Follow-up issue occurs at == Generating code == phase.

== Generating code ==
StreamChainTest_src/Utils.encore.c:309:39: error: too many arguments to function call, expected single argument 'ctx', have 2 arguments
  stream_t* _stream = stream_mk(_ctx, ENCORE_PRIMITIVE);
                      ~~~~~~~~~       ^~~~~~~~~~~~~~~~

@supercooldave
Copy link

It seems that only one argument is expected (from the stream.c above), but two are passed.

kikofernandez pushed a commit that referenced this issue Apr 29, 2016
* Fixed generating wrong arguments in stream_mk() #396

* Removed AsExpr #396
@kikofernandez
Copy link
Contributor

solved in PR #401

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

3 participants