summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-01-30 00:58:26 +0300
committerEugene Burmako <xeno.by@gmail.com>2014-02-14 23:51:21 +0100
commitda09331324d302d0b85a89cdcfe32ded2587b39a (patch)
tree378d9c217e92e6c47af057a4c7bf85b91408c855 /src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
parent465e538ef59171ac7d9e811dbdaec776f8a64ac7 (diff)
downloadscala-da09331324d302d0b85a89cdcfe32ded2587b39a.tar.gz
scala-da09331324d302d0b85a89cdcfe32ded2587b39a.tar.bz2
scala-da09331324d302d0b85a89cdcfe32ded2587b39a.zip
SI-6732 deprecates internal#Symbol.isPackage
This is the first step in disentangling api#Symbol.isPackage, which is supposed to return false for package classes, and internal#Symbol.isPackage, which has traditionally being used as a synonym for hasPackageFlag and hence returned true for package classes (unlike isModule which is false for module classes).
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index 2f9cc01c0b..ea600bc586 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -561,14 +561,14 @@ abstract class ClassfileParser {
// if this is a non-static inner class, remove the explicit outer parameter
val paramsNoOuter = innerClasses getEntry currentClass match {
case Some(entry) if !isScalaRaw && !entry.jflags.isStatic =>
- /* About `clazz.owner.isPackage` below: SI-5957
+ /* About `clazz.owner.hasPackageFlag` below: SI-5957
* For every nested java class A$B, there are two symbols in the scala compiler.
* 1. created by SymbolLoader, because of the existence of the A$B.class file, owner: package
* 2. created by ClassfileParser of A when reading the inner classes, owner: A
* If symbol 1 gets completed (e.g. because the compiled source mentions `A$B`, not `A#B`), the
* ClassfileParser for 1 executes, and clazz.owner is the package.
*/
- assert(params.head.tpe.typeSymbol == clazz.owner || clazz.owner.isPackage, params.head.tpe.typeSymbol + ": " + clazz.owner)
+ assert(params.head.tpe.typeSymbol == clazz.owner || clazz.owner.hasPackageFlag, params.head.tpe.typeSymbol + ": " + clazz.owner)
params.tail
case _ =>
params