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

Problem with some circular dependencies #9

Open
ShadowBelmolve opened this issue Jan 6, 2014 · 3 comments
Open

Problem with some circular dependencies #9

ShadowBelmolve opened this issue Jan 6, 2014 · 3 comments

Comments

@ShadowBelmolve
Copy link

Reference Gist

Seems that if you import an "interface A"(IEntity) that has a variable of type "class B"(EntityData) that has a function with return type "class C"(Entity) and "class C" implements the "interface A", then variables from "interface A" simply aren't copied to "class C" or something like this.

The same if you import "Class C" and then "Interface A".

But no problems for imports "Class C" or "Interface A" and "Class C"

@RealyUniqueName
Copy link
Owner

This happens because when macro is trying to resolve imported classes haxe compiller actualy build class before resolving.
Unfortunately i didn't find any easy way to workaround this. The only way i see is to parse sources manually (without haxe compiler) to fin full classpaths of imported types. But this is not easy task for me.

@hexonaut
Copy link

hexonaut commented Apr 9, 2014

I'm having the same problem. Is there any way to work around this?

@RealyUniqueName
Copy link
Owner

The only possible way to solve this problem is to not use import statements and use full classpaths in traits' code and remove all Context.getType() calls in haxe-traits code

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