|
Lines 626-632
abstract class ClassfileParser {
Link Here
|
| 626 |
sawPrivateConstructor = true |
626 |
sawPrivateConstructor = true |
| 627 |
in.skip(2); skipAttributes() |
627 |
in.skip(2); skipAttributes() |
| 628 |
} else { |
628 |
} else { |
| 629 |
if ((sflags & PRIVATE) != 0L && global.settings.optimise.value) { |
629 |
if ((sflags & PRIVATE) != 0L && global.settings.optimise.value) { // TODO this should be !optimize, no? See c4181f656d. |
| 630 |
in.skip(4); skipAttributes() |
630 |
in.skip(4); skipAttributes() |
| 631 |
} else { |
631 |
} else { |
| 632 |
val name = pool.getName(in.nextChar) |
632 |
val name = pool.getName(in.nextChar) |
|
Lines 636-642
abstract class ClassfileParser {
Link Here
|
| 636 |
info match { |
636 |
info match { |
| 637 |
case MethodType(params, restpe) => |
637 |
case MethodType(params, restpe) => |
| 638 |
// if this is a non-static inner class, remove the explicit outer parameter |
638 |
// if this is a non-static inner class, remove the explicit outer parameter |
| 639 |
val newParams = innerClasses getEntry currentClass match { |
639 |
val paramsNoOuter = innerClasses getEntry currentClass match { |
| 640 |
case Some(entry) if !isScalaRaw && !isStatic(entry.jflags) => |
640 |
case Some(entry) if !isScalaRaw && !isStatic(entry.jflags) => |
| 641 |
/* About `clazz.owner.isPackage` below: SI-5957 |
641 |
/* About `clazz.owner.isPackage` below: SI-5957 |
| 642 |
* For every nested java class A$B, there are two symbols in the scala compiler. |
642 |
* For every nested java class A$B, there are two symbols in the scala compiler. |
|
Lines 650-655
abstract class ClassfileParser {
Link Here
|
| 650 |
case _ => |
650 |
case _ => |
| 651 |
params |
651 |
params |
| 652 |
} |
652 |
} |
|
|
653 |
val newParams = paramsNoOuter match { |
| 654 |
case (init :+ tail) if (jflags & JAVA_ACC_SYNTHETIC) != 0L => |
| 655 |
// SI-7455 strip trailing dummy argument ("access constructor tag") from synthetic constructors which |
| 656 |
// are added when an inner class needs to access a private constructor. |
| 657 |
init |
| 658 |
case _ => |
| 659 |
paramsNoOuter |
| 660 |
} |
| 661 |
|
| 653 |
info = MethodType(newParams, clazz.tpe) |
662 |
info = MethodType(newParams, clazz.tpe) |
| 654 |
} |
663 |
} |
| 655 |
sym.setInfo(info) |
664 |
sym.setInfo(info) |