File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -52,3 +52,27 @@ package i17156:
5252    import  b .Xd 
5353    trait  Z  derives  Xd  //  checks if dealiased import is prefix a.Foo
5454    class  Bar  extends  Xd [Int ] //  checks if import qual b is prefix of b.Xd
55+ 
56+ object  Coll : 
57+   class  C : 
58+     type  HM [K , V ] =  scala.collection.mutable.HashMap [K , V ]
59+ object  CC  extends  Coll .C 
60+ import  CC .* 
61+ 
62+ def  `param type is imported` (map : HM [String , String ]):  Unit  =  println(map(" hello, world" 
63+ 
64+ object  Constants : 
65+   final  val  i  =  42 
66+ def  `old-style constants are usages` :  Unit  = 
67+   object  Local : 
68+     final  val  j  =  27 
69+   import  Constants .i 
70+   println(i +  Local .j)
71+ 
72+ class  `scope of super` : 
73+   import  Constants .i  //  bad warn
74+   class  C (x : Int ): 
75+     def  y  =  x
76+   class  D  extends  C (i): 
77+     import  Constants .*  //  does not resolve i in C(i)
78+     def  m  =  i
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments