Skip to content
Browse files

removing defensive code made obsolete by existing fix to SI-5604

SI-5604 was fixed in commit e6f10b0
  • Loading branch information...
1 parent c4e37d6 commit 841dbc9c8cc6d7344b680bc916abf29849622c63 @magarciaEPFL magarciaEPFL committed
View
5 src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
@@ -856,12 +856,11 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
}
def genLoadModule(tree: Tree): BType = {
- // Working around SI-5604. Rather than failing the compile when we see a package here, check if there's a package object.
val module = (
if (!tree.symbol.isPackageClass) tree.symbol
else tree.symbol.info.member(nme.PACKAGE) match {
- case NoSymbol => abort(s"Cannot use package as value: $tree") ; NoSymbol
- case s => devWarning("Bug: found package class where package object expected. Converting.") ; s.moduleClass
+ case NoSymbol => abort(s"SI-5604: Cannot use package as value: $tree")
+ case s => abort(s"SI-5604: found package class where package object expected: $tree")
}
)
lineNumber(tree)
View
6 src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala
@@ -440,13 +440,11 @@ abstract class BCodeHelpers extends BCodeTypes with BytecodeWriters {
if (sym0 == definitions.NullClass) return RT_NULL;
if (sym0 == definitions.NothingClass) return RT_NOTHING;
- // Working around SI-5604. Rather than failing the compile when we see
- // a package here, check if there's a package object.
val sym = (
if (!sym0.isPackageClass) sym0
else sym0.info.member(nme.PACKAGE) match {
- case NoSymbol => abort(s"Cannot use package as value: ${sym0.fullName}")
- case s => devWarning("Bug: found package class where package object expected. Converting.") ; s.moduleClass
+ case NoSymbol => abort(s"SI-5604: Cannot use package as value: ${sym0.fullName}")
+ case s => abort(s"SI-5604: found package class where package object expected: $s")
}
)

0 comments on commit 841dbc9

Please sign in to comment.
Something went wrong with that request. Please try again.