The Acid Test for Enhanced Type Checking
Hi,
I've been going through my code seeing where the enhanced type checking (i.e., the mode toggled by ALT+CTRL+SHIFT-E) in the Scala plug-in breaks down on my code (all of which compiles, of course).
One thing really jumps out at me: Combinator Parsers! Gobs of red!
The combinator operators, e.g.: ~, ~!, ~>, |, ^^, etc. are all flagged "Cannot resolve symbol <op>" (with the actual operator in place of <op>, of course).
I got this result with both 0.3.1807 and 0.3.1814 under IDEA 9.0.3 #95.390.
Randall Schulz
请先登录再写评论。
There is a bug in scalap with nested classes and type aliases which probably to blame.
Take a look at Parsers.scala and Parsers.class (pick with CTRL-SHIFT-N)
Parsers.class:
def success[T](v : T) : scala.util.parsing.combinator.Parsers.Parser[T] = { /* compiled code */ }
The return type should actually be: scala.util.parsing.combinator.Parsers.this#Parser[T]
I tried to fix it, but Ilya needs to finish it off.
-jason
Hi Randall,
We've patched up scalap and it will be integrated soon:
http://git.jetbrains.org/?p=idea/scala-plugin.git;a=summary
There are still other issues with type inference that are shown up by parser combinator code, things are moving in the right direction. I was using this code to test:
http://jim-mcbeath.blogspot.com/2008/09/scala-parser-combinators.html
-jason
Now it's problems with dependent types, which I'm going to try to implement this week. I hope this acid test helps me.
Best regards,
Alexander Podkhalyuzin.
Looks like you've succeeded. My parsers (and other classes with spurious errors when ALT+SHIFT+CTRL-E is enabled) now have vastly less red.
Thanks!
Update: Oops! False un-alarm. I'm not sure what (I thought) I was seeing, but the vast swaths of red remain in my parsers.
Randall Schulz
I've not implemented it yet. I'm in progress on huge refactoring.
Best regards,
Alexander Podkhalyuzin.