File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed 
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,9 @@ object SpaceEngine {
347347    case  pat : Ident  if  isBackquoted(pat) => 
348348      Typ (pat.tpe, decomposed =  false )
349349
350+     case  pat : Ident  if  pat.name ==  nme.WILDCARD  => 
351+       Typ (erase(pat.tpe.stripAnnots.widenSkolem), decomposed =  false )
352+ 
350353    case  Ident (_) |  Select (_, _) => 
351354      Typ (erase(pat.tpe.stripAnnots.widenSkolem, isValue =  true ), decomposed =  false )
352355
Original file line number Diff line number Diff line change 1+ //  scalac: -Werror
2+ trait  Foo : 
3+   type  Bar [_]
4+ 
5+ object  Foo : 
6+   type  Aux [B [_]] =  Foo  { type  Bar [A ] =  B [A ] }
7+ 
8+ class  Test : 
9+   def  t1 [B [_]](self : Option [Foo .Aux [B ]]) =  self match 
10+     case  Some (_) =>  1 
11+     case  None     =>  2 
12+ 
13+   def  t2 [B [_]](self : Option [Foo .Aux [B ]]) =  self match 
14+     case  Some (f) =>  1 
15+     case  None     =>  2 
Original file line number Diff line number Diff line change 1+ //  scalac: -Werror
2+ import  scala .util .* 
3+ 
4+ trait  Transaction  {
5+   type  State [_]
6+ }
7+ object  Transaction  {
8+   type  of [S [_]] =  Transaction  { type  State [A ] =  S [A ] }
9+ }
10+ trait  DynamicScope [State [_]]
11+ 
12+ case  class  ScopeSearch [State [_]](self : Either [Transaction .of[State ], DynamicScope [State ]]) {
13+ 
14+   def  embedTransaction [T ](f : Transaction .of[State ] =>  T ):  T  = 
15+     self match  {
16+       case  Left (integrated) =>  ??? 
17+       case  Right (ds)        =>  ??? 
18+     }
19+ }
20+ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments