File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed 
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4696,9 +4696,11 @@ object Parsers {
46964696          stats +=  closure(in.offset, Location .InBlock , modifiers(BitSet (IMPLICIT )))
46974697        else  if  isIdent(nme.extension) &&  followingIsExtension() then 
46984698          stats +=  extension()
4699-         else  if  outermost &&  ctx.mode.is(Mode .Interactive ) &&  isDefIntro(localModifierTokens) then 
4700-           stats +++=  localDef(in.offset)
4701-         else  if  isDefIntro(localModifierTokens, excludedSoftModifiers =  Set (nme.`opaque`)) then 
4699+         else  if  isDefIntro(localModifierTokens,
4700+             excludedSoftModifiers = 
4701+               //  Allow opaque definitions at outermost level in REPL.
4702+               if  outermost &&  ctx.mode.is(Mode .Interactive )
4703+               then  Set .empty else  Set (nme.`opaque`)) then 
47024704          stats +++=  localDef(in.offset)
47034705        else 
47044706          empty =  true 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments