File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed 
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ trait Dynamic {
268268            if  tpe.paramInfoss.nestedExists(! TypeErasure .hasStableErasure(_)) then 
269269              fail(i " has a parameter type with an unstable erasure " ) ::  Nil 
270270            else 
271-               TypeErasure .erasure( tpe). asInstanceOf [ MethodType ].paramInfos .map(clsOf(_ ))
271+               tpe.paramInfoss.flatten .map(tp  =>   clsOf(tp.baseType(tp.classSymbol) ))
272272          structuralCall(nme.applyDynamic, classOfs).maybeBoxingCast(tpe.finalResultType)
273273        }
274274
Original file line number Diff line number Diff line change 1+ import  scala .reflect .Selectable .reflectiveSelectable 
2+ 
3+ object  Test  {
4+   type  Runner  =  { def  run (args : Array [String ]):  Unit  }
5+ 
6+   def  test (args : Array [String ], runner : Runner ):  Unit  = 
7+     runner.run(args)
8+ 
9+   def  main (args : Array [String ]):  Unit  =  {
10+     test(Array (" foo"  , " bar"  ), new  {
11+       def  run (args : Array [String ]):  Unit  =  args foreach println
12+     })
13+   }
14+ }
Original file line number Diff line number Diff line change 1+ import  scala .reflect .Selectable .reflectiveSelectable 
2+ 
3+ type  Runner  =  { def  run (args : Array [String ]):  Unit  }
4+ 
5+ def  test (runner : Runner ):  Unit  =  runner.run(??? )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments