File tree Expand file tree Collapse file tree 3 files changed +3
-10
lines changed 
src/compiler/scala/tools/nsc/backend Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -1122,15 +1122,11 @@ abstract class GenICode extends SubComponent  {
11221122      }
11231123
11241124    private  def  genLoadModule (ctx : Context , tree : Tree ):  Context  =  {
1125-       //  Working around SI-5604.  Rather than failing the compile when we see
1126-       //  a package here, check if there's a package object.
11271125      val  sym  =  (
11281126        if  (! tree.symbol.isPackageClass) tree.symbol
11291127        else  tree.symbol.info.member(nme.PACKAGE ) match  {
11301128          case  NoSymbol  =>  abort(" Cannot use package as value: "   +  tree)
1131-           case  s        => 
1132-             devWarning(s " Found  ${tree.symbol} where a package object is required. Converting to  ${s.moduleClass}" )
1133-             s.moduleClass
1129+           case  s        =>  abort(s " Found  ${tree.symbol} where a package object is required. " )
11341130        }
11351131      )
11361132      debuglog(" LOAD_MODULE from %s: %s"  .format(tree.shortClass, sym))
Original file line number Diff line number Diff line change @@ -859,12 +859,11 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
859859    }
860860
861861    def  genLoadModule (tree : Tree ):  BType  =  {
862-       //  Working around SI-5604.  Rather than failing the compile when we see a package here, check if there's a package object.
863862      val  module  =  (
864863        if  (! tree.symbol.isPackageClass) tree.symbol
865864        else  tree.symbol.info.member(nme.PACKAGE ) match  {
866865          case  NoSymbol  =>  abort(s " Cannot use package as value:  $tree" ) ; NoSymbol 
867-           case  s        =>  devWarning( " Bug : found package class where package object expected.  Converting."  ) ; s.moduleClass 
866+           case  s        =>  abort( " SI-5604 : found package class where package object expected.  Converting."  )
868867        }
869868      )
870869      lineNumber(tree)
Original file line number Diff line number Diff line change @@ -440,13 +440,11 @@ abstract class BCodeHelpers extends BCodeTypes with BytecodeWriters {
440440        if  (sym0 ==  definitions.NullClass )    return  RT_NULL ;
441441        if  (sym0 ==  definitions.NothingClass ) return  RT_NOTHING ;
442442
443-         //  Working around SI-5604.  Rather than failing the compile when we see
444-         //  a package here, check if there's a package object.
445443        val  sym  =  (
446444          if  (! sym0.isPackageClass) sym0
447445          else  sym0.info.member(nme.PACKAGE ) match  {
448446            case  NoSymbol  =>  abort(s " Cannot use package as value:  ${sym0.fullName}" )
449-             case  s        =>  devWarning( " Bug : found package class where package object expected.  Converting. " ) ; s.moduleClass 
447+             case  s        =>  abort( " SI-5604 : found package class where package object expected." ) 
450448          }
451449        )
452450
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments