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

Tab completion on Array causes ammonite to exit #252

Closed
dickwall opened this Issue Oct 11, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@dickwall

dickwall commented Oct 11, 2015

If you hit tab to complete on the following line after opening ammonite:

val a = new Array then hit tab to invoke completion, you get a scala.reflect.internal.FatalError and ammonite immediately exits. Example transcript is shown below.

Note that I found this because I created an ArrayElement class for a demo, and hit tab to complete after typing Array. Ammonite probably shouldn't completely bug out in this case even if there is an error in the completion.

Loading...
Welcome to the Ammonite Repl 0.4.8
(Scala 2.11.7 Java 1.8.0_60)
@ class ArrayElement {
    def x = 10
  }
defined class ArrayElement
@ val ae = new ArrayException in thread "main" scala.reflect.internal.FatalError: Something is wrong: cannot find T in applied type Array
   sought  T in Array
 classSym  Array in scala
  tparams  T in Array

    at scala.reflect.internal.Reporting$class.abort(Reporting.scala:59)
    at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:16)
    at scala.reflect.internal.tpe.TypeMaps$AsSeenFromMap.correspondingTypeArgument(TypeMaps.scala:565)
...

lihaoyi added a commit that referenced this issue Nov 15, 2015

Merge pull request #258 from ssanj/master
Fix Tab completion on Array causes ammonite to exit (#252)
@lihaoyi

This comment has been minimized.

Owner

lihaoyi commented Nov 16, 2015

Fixed by @ssanj , thanks!

@lihaoyi lihaoyi closed this Nov 16, 2015

lihaoyi added a commit that referenced this issue Nov 17, 2015

Merge pull request #263 from ssanj/master
Add regression test around #252 and fix formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment