Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

rock picks wrongs method depending on the location of classes #298

Open
showstopper opened this Issue Aug 6, 2011 · 1 comment

Comments

Projects
None yet
2 participants
Member

showstopper commented Aug 6, 2011

https://gist.github.com/1129434

Try compile the snippet above and you'll get a C-compiler error (here it's clang).

rock_tmp/./main.c:46:17: error: too few arguments to function call, expected 1,
      have 0
    myclasses__B_new();
    ~~~~~~~~~~~ ^
1 error generated.
C compiler failed (with code 1), aborting compilation process

If you put classes + main func into the same file it compiles like a charm.

TL;DR: Depending on location of classes rock picks the wrong super method

EDIT: changing the order of the init functions fixes the issue => suffix is probably not taken into account. Location issue keeps being the major wtf, though.

EDIT: Issue does not depend on the function being "init", fails for arbitary functions as well, => "super func" issue

@showstopper showstopper was assigned Aug 6, 2011

Collaborator

shamanas commented Dec 4, 2011

Well is this actually supposed to be valid? The suffix is part of the function's signature, so to overload init~noArg in class B you should do init: super func ~noArg imo. This is still a bug though as rock does not understand that there is no such function to overload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment