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
forall seems to break syntax #44
Comments
Good catch! I think this issue is related to #9 BTW, Do you know if sublime text have this issue? |
I would like to add how this works fine: def convert?(input : String) : T? forall T
converter = ConversionManager.global_converters![T.name]
converter ||= convert
end This however only cursives the method in question instead of everything: def inner! : TypeConverter(T) forall T
@inner.as TypeConverter(T)
end |
Hi @Proximyst Thank you for your comment!, To fix this issue I need to do some changes in current syntax file An alternative is replacing current json file and return back to tmLanguage file, but I don't know if ST has this issue as well 😅 |
The fact there are no issues on it so far indicates it most likely isn't there. You could however try to type out the snippet yourself. I by the way found out why the module Cropt
module Internal
struct TypeConverter
def initialize(@inner : Cropt::TypeConverter(T)) forall T
end
def inner! : TypeConverter(T) forall T
@inner.unsafe_as TypeConverter(T)
end
end
end
end |
So, I think I gonna replace my custom crystal.json syntax by official TextMate Crystal.tmLanguage or Sublime Crystal.tmLanguage 😅 WDYT? |
Looks like is working fine with TextMate Crystal.tmLanguage 🎉 Will be available on next release 😉 |
That looks great. Thanks for the look into the issue ^^ |
next minor version 0.3.11 (available soon on vscode marketplace) fixes this (thanks to @icyleaf) |
Example:
Looks like it's somehow related to the parentheses? Wrapping the return value in parens "fixes" it:
The text was updated successfully, but these errors were encountered: