Skip to content

Commit 91f9c82

Browse files
committed
More broken tests
1 parent 75d1d4d commit 91f9c82

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/warn/i19657.scala

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)