RFE: add type to member
fommil opened this issue · 2 comments
it would be brilliant to be able to add the type to any member. This is not as trivial as it sounds because the types are often really messy.
Also, it would be excellent if some code could be shared with a standalone tool that could work with input from scalap to use the exact type, not the presentation compiler's (sometimes wrong) guess at the type.
In Scala IDE we have the ExplicitReturnType quick fix, which is doing this. It works fine in most cases but because it is not based on tree transformations. There is also the AddReturnTypeToPublicSymbols save action, which is based on scala-refactoring but it produces too many errors. Some of the problems are so difficult to fix that I never managed to fix all known problems.
If such a feature is added to scala-refactoring it definitely can't rely on tree printing.
yeah, but if we get http://ensime.github.io/contributing/ideas/#source-code-preserving-ast we can