File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed 
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,7 @@ object SpaceEngine {
449449   * 
450450   *  @param  inArray  whether `tp` is a type argument to `Array` 
451451   *  @param  isValue  whether `tp` is the type which match against values 
452+    *  @param  isTyped  whether `tp` is the type from a `Typed` tree 
452453   * 
453454   *  If `isValue` is true, then pattern-bound symbols are erased to its upper bound. 
454455   *  This is needed to avoid spurious unreachable warnings. See tests/patmat/i6197.scala. 
@@ -459,7 +460,7 @@ object SpaceEngine {
459460        WildcardType 
460461
461462      case  tp @  AppliedType (tycon, args) => 
462-         val  inArray  =  tycon.isRef(defn.ArrayClass )
463+         val  inArray  =  tycon.isRef(defn.ArrayClass )  ||  tp.translucentSuperType.isRef(defn. ArrayClass ) 
463464        val  args2  = 
464465          if  isTyped &&  ! inArray then  args.map(_ =>  WildcardType )
465466          else  args.map(arg =>  erase(arg, inArray =  inArray, isValue =  false ))
Original file line number Diff line number Diff line change 1+ //  Capturing the regression will implementing the fix for i18364
2+ //  That broke in CI, "case _" "Unreachable case except for null"
3+ //  Because IArray is an opaque alias of Array
4+ object  Tup : 
5+   /**  Convert an immutable array into a tuple of unknown arity and types */  
6+   def  fromIArray [T ](xs : IArray [T ]):  Tuple  = 
7+     val  xs2 :  IArray [Object ] =  xs match 
8+       case  xs : IArray [Object ] @ unchecked =>  xs
9+       case  _ =>  xs.map(_.asInstanceOf [Object ])
10+     runtime.Tuples .fromIArray(xs2)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments