The API docs say that isPackage should imply isTerm, which makes sense. However, in 2.10-RC2, isPackage returns true for both packages and package classes, which are not terms.
Example repro code:
import scala.tools.nsc
val compiler = new nsc.Global(new nsc.Settings)
new compiler.Run
val sp = compiler.definitions.ScalaPackageClass
println("isPackageClass: " + sp.isPackageClass)
println("isPackage: " + sp.isPackage)
println("isTerm: " + sp.isTerm)
This prints:
isPackageClass: true
isPackage: true
isTerm: false
Something should give. In my opinion, the public API docs make more sense than the current behavior, so change the implementation. Have isPackage return false for package classes.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4