简体   繁体   中英

Why scala 2.8 REPL does not auto-complete some method (i.e. forall, exists)?

I started the scala REPL an write the following code:

scala> val a = Array(1,2,3,4)
a: Array[Int] = Array(1, 2, 3, 4)

scala> a.`<TAB>`

asInstanceOf   getClass       isInstanceOf   toString

scala> a.exists(_ == 1)
res1: Boolean = true

Why I don't have "exists" listed when I press <TAB>?

I think it because Array do not have 'exists' method. 'exists' method is belong to ArrayOps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM