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
Auto-complete <tab> feature does not see imported functions/objects #8581
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8581?orig=1 |
@som-snytt said: Welcome to Scala version 2.11.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0).
Type in expressions to have them evaluated.
Type :help for more information.
scala> object Foo { def foo = 1000 }
defined object Foo
scala> Foo. // OK
asInstanceOf foo isInstanceOf toString
scala> import Foo._
import Foo._
scala> foo // OK
foo
scala> foo
res0: Int = 1000
scala> :pa -raw
// Entering paste mode (ctrl-D to finish)
package om { object Obj { def foodie = 42 }}
// Exiting paste mode, now interpreting.
scala> import om.Obj
import om.Obj
scala> foo
<console>:9: error: not found: value foo
foo
^
scala> import math.cos // OK
cos cosh
scala> import math.cos
import math.cos
scala> co // no cos
com collection compat concurrent
scala> co // double-tab
com conforms collection compat concurrent
scala> import concurrent._
import concurrent._
scala> Fut // no Future at all
<console>:16: error: not found: value Fut
Fut
^ |
Karolis Misiunas (k.misiunas-at-gmail.com) said: |
@SethTisue said: |
Kevin Kilroy (keki) said (edited on Apr 27, 2016 3:30:42 PM UTC): i.e. test.scala: scala -i test.scala
Note, importing the file using :load works OK. |
@som-snytt said: |
@som-snytt said: |
It seems some features were not correctly transferred between Scala versions 2.10.x and 2.11.0. In particular Auto-complete feature does not recognise functions or objects that were imported.
Example in 2.11.0:
scala> import Math.cos
import Math.cos
scala> co<tab>
com collection compat concurrent
While in 2.10.4 it was:
scala>import Math.cos
import Math.cos
scala> co<tab>
cos com collection compat concurrent
This feature is highly desired as it allows to quickly access method that were automatically imported. It also does not work for objects - this is very useful as it used to be possible to do this in 2.10.x:
CustomObject.<tab>
gives methods
This also does not work anymore. Hopefully these great features can be revived. Thank you!
The text was updated successfully, but these errors were encountered: