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

Forward declaration order broken with closures #16

Closed
TobiasWrigstad opened this issue Jul 20, 2014 · 7 comments
Closed

Forward declaration order broken with closures #16

TobiasWrigstad opened this issue Jul 20, 2014 · 7 comments

Comments

@TobiasWrigstad
Copy link
Contributor

Forward declarations in C code for Closures can be placed before forward declarations of the data types that appear in their signatures. Manually editing the C files can resolve this, but I suspect some dependencies are not tracked properly when figuring out the order of forward declarations in the code generator. Attempts at moving Encore code around to resolve the matter only caused graver such problems. It may well be that this problem is not dependent on closures, but I have only been able to see it when closures were used.

I do not have a simple test case at this point. Sorry.

@EliasC
Copy link
Contributor

EliasC commented Jul 21, 2014

Does this program give you the same kind of error?

class Foo
  def foo() : Bar
    new Bar

class Bar

class Main
  def main() : void
    ()

@EliasC
Copy link
Contributor

EliasC commented Jul 22, 2014

@TobiasWrigstad Are you still experiencing the same problems? I've pushed a fix to the bug that the program in my previous comment revealed, and this should make sure that all class types are declared before their use.

@TobiasWrigstad
Copy link
Contributor Author

Not seeing the same problems anymore!

22 jul 2014 kl. 19:41 skrev EliasC [email protected]:

@TobiasWrigstad Are you still experiencing the same problems? I've pushed a fix to the bug that the program in my previous comment revealed, and this should make sure that all class types are declared before their use.


Reply to this email directly or view it on GitHub.


Tobias Wrigstad, associate professor (docent)
Department of Information Technology
Uppsala University, Sweden
Email: [email protected]
Office: +46-18-471-1072
Cell: +46-736-97-14-19
Web: http://wrigstad.com

@TobiasWrigstad
Copy link
Contributor Author

@EliasC
See issue 23

@EliasC
Copy link
Contributor

EliasC commented Aug 4, 2014

Yup, there's already a test case exposing the bug.

@EliasC EliasC reopened this Aug 4, 2014
@EliasC
Copy link
Contributor

EliasC commented Aug 7, 2014

Although I think this is related to passive classes rather than closures.

@TobiasWrigstad
Copy link
Contributor Author

Agreed!

@EliasC EliasC closed this as completed Aug 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants