-
Notifications
You must be signed in to change notification settings - Fork 157
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
Fix wrong iterator handling for user types in repeat-until. #134
base: master
Are you sure you want to change the base?
Fix wrong iterator handling for user types in repeat-until. #134
Conversation
Thanks! I'll try to add the relevant test first and check if this problem existing with other languages. Also, why are you using |
Simply didn't think of that, thanks for the catch! |
After reviewing it again, I'm kind of unsure how to treat it.
Even with type parameters, it's not very clear what one should expect. Right now you're kind of using the fact that Setting |
…d for KS and its support for other languages and use-cases than I expected. I was able to rewrite my KS for now because of the usage of FMPP, so don't rely in this fix anymore. this way I'm more back in line with master again.
I think not in my use case and that's why I used It's something around the following:
The workaround I'm implementing is VERY specific to my data and use case, but as it was still doable in KS, I'm doing it there to in theory benefit in all supported target languages. So you might perfectly come to the conclusion that it's not worth support in KS at all. OTOH, in my opinion it was obvious to assume that Additionally, I had another look at my implementation and am pretty sure that I can rework my current solution and that special use case to not rely on |
I've reworked my types to not rely on the fixes of this PR anymore. @GreyCat, feel free to close it if you think this needs a more thorough discussion on how to support things how/when. If you close it, have a second look at the following line, because using |
I have the following KSY which broke in Ruby and Java because the special iterator
_
has not been processed properly. In Ruby it wasn't declared early enough and is therefore not known during user type invocation and in Java it wasn't initialized properly, leading to a compile time error. This PR fixes both.I did the change in
RubyTranslator
because I wasn't sure if translating_
is missing there by accident or purpose and came across it. Feel free to change that if it was wrong.KSY:
Wrong Ruby:
Wrong Java:
Working Ruby:
Working Java: