@@ -39,8 +39,8 @@ trait SymDenotations { this: Context =>
39
39
initPrivateWithin : Symbol = NoSymbol )(implicit ctx : Context ): SymDenotation = {
40
40
val result =
41
41
if (symbol.isClass)
42
- if (initFlags is Package ) new PackageClassDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin)
43
- else new ClassDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin)
42
+ if (initFlags is Package ) new SymDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin) with PackageClassDenotation
43
+ else new SymDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin) with ClassDenotation
44
44
else new SymDenotation (symbol, owner, name, initFlags, initInfo, initPrivateWithin)
45
45
result.validFor = stablePeriod
46
46
result
@@ -1278,14 +1278,7 @@ object SymDenotations {
1278
1278
1279
1279
/** The contents of a class definition during a period
1280
1280
*/
1281
- class ClassDenotation private [SymDenotations ] (
1282
- symbol : Symbol ,
1283
- maybeOwner : Symbol ,
1284
- name : Name ,
1285
- initFlags : FlagSet ,
1286
- initInfo : Type ,
1287
- initPrivateWithin : Symbol )
1288
- extends SymDenotation (symbol, maybeOwner, name, initFlags, initInfo, initPrivateWithin) {
1281
+ trait ClassDenotation extends SymDenotation {
1289
1282
1290
1283
import util .LRUCache
1291
1284
@@ -1351,8 +1344,8 @@ object SymDenotations {
1351
1344
1352
1345
// ----- denotation fields and accessors ------------------------------
1353
1346
1354
- if (initFlags is (Module , butNot = Package ))
1355
- assert(name.is(ModuleClassName ), s " module naming inconsistency: ${name.debugString}" )
1347
+ // if (initFlags is (Module, butNot = Package))
1348
+ // assert(name.is(ModuleClassName), s"module naming inconsistency: ${name.debugString}")
1356
1349
1357
1350
/** The symbol asserted to have type ClassSymbol */
1358
1351
def classSymbol : ClassSymbol = symbol.asInstanceOf [ClassSymbol ]
@@ -1804,14 +1797,7 @@ object SymDenotations {
1804
1797
/** The denotation of a package class.
1805
1798
* It overrides ClassDenotation to take account of package objects when looking for members
1806
1799
*/
1807
- final class PackageClassDenotation private [SymDenotations ] (
1808
- symbol : Symbol ,
1809
- ownerIfExists : Symbol ,
1810
- name : Name ,
1811
- initFlags : FlagSet ,
1812
- initInfo : Type ,
1813
- initPrivateWithin : Symbol )
1814
- extends ClassDenotation (symbol, ownerIfExists, name, initFlags, initInfo, initPrivateWithin) {
1800
+ trait PackageClassDenotation extends ClassDenotation {
1815
1801
1816
1802
private [this ] var packageObjCache : SymDenotation = _
1817
1803
private [this ] var packageObjRunId : RunId = NoRunId
0 commit comments