File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed 
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -156,10 +156,10 @@ object Checking {
156156                  //  if we attempt to check bounds of F-bounded mutually recursive Java interfaces.
157157                  //  Do check all bounds in Scala units and those bounds in Java units that
158158                  //  occur in applications of Scala type constructors.
159-                   &&  tycon.typeSymbol.is(CaptureChecked )
160-                   //  Exempted are  types that are not themselves capture-checked. 
161-                   //  Since the type constructor could not foresee possible capture sets, 
162-                   //  it's better to be lenient for backwards compatibility.
159+                   &&  ( ! isCaptureChecking  ||   tycon.typeSymbol.is(CaptureChecked ) )
160+                   //  When capture checking,  types that are not themselves capture-checked
161+                   //  are exempted.  Since the type constructor could not foresee possible
162+                   //  capture sets,  it's better to be lenient for backwards compatibility.
163163              then 
164164                checkAppliedType(
165165                  untpd.AppliedTypeTree (TypeTree (tycon), argTypes.map(TypeTree (_)))
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments