Open jdonaldson opened 11 years ago
Ok, this is really weird but I cannot really track down the cause of it. I've tried commenting out everything in TypeTools
to find out that even such harmless functions as reduce
make it fail. However the problem does disappear when using the compiler server.
Thanks for looking into it. I had a hard time even coming up with a minimal example. Unfortunately, this problem really affects the usability of Promise. The argument types are altered via a macro, and a --display completion makes the new types clear. I was hoping that you would see some sort of clue :/
Yeah, sorry, I'll try to make a minimal example for Simn. But in any case it's nothing I think I can solve, so you'll have to not use tink_macro or use the compilation server until the next Haxe version. Which hopefully is coming soon.
Thanks for passing this along. TInk is becoming "bread and butter" for a lot of my macro work. Great stuff.
FWIW I ended up finding another way to do this without TypeTools. But, I'll keep tabs on this for the future.
I have the following (greatly simplfied) class and method, where I want to retrieve completions:
When I trigger the completion after MacroClass.func(m).|, I get back a single "unknown" type value from the compiler.
Strangely enough, if I delete the "x" variable declaration it works. Or, if I delete the constructor variable declaration, it works. Also, if I delete the import of TypeTools, it will work. Here's the MacroClass class from above. It just returns a macro'd string, and I'd expect to see relevant completions for string methods as completion candidates:
Also, here's a simple build file that will pull this together:
I'm on haxe 3 fwiw.