Skip to content

Commit d1f9441

Browse files
committed
Fix test i15503j
1 parent 0cb2af0 commit d1f9441

File tree

1 file changed

+38
-4
lines changed

1 file changed

+38
-4
lines changed

tests/neg-custom-args/fatal-warnings/i15503j.scala

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// scalac: -Wunused:strict-no-implicit-warn
22

3-
package unused.test:
3+
package foo.unused.strict.test:
44
package a:
55
given x: Int = 0
66
implicit val y: Int = 1
@@ -16,10 +16,44 @@ package unused.test:
1616
import a.f // error
1717
package c:
1818
import a.given // OK
19-
import a._ // OK
20-
import a.* // OK
2119
import a.x // OK
2220
import a.y // OK
2321
import a.z // OK
2422
import a.f // OK
25-
def g = f + z + y + x
23+
def g = f + z + y + x
24+
25+
package foo.implicits.resolution:
26+
class X
27+
class Y extends X
28+
object A { implicit val x: X = new X }
29+
object B { implicit val y: Y = new Y }
30+
class C {
31+
import A._ // OK
32+
import B._ // OK
33+
def t = implicitly[X]
34+
}
35+
36+
package foo.unused.summon.inlines:
37+
package lib:
38+
trait A
39+
trait B
40+
trait C
41+
trait X
42+
43+
given willBeUnused: (A & X) = new A with X {}
44+
given willBeUsed: (A & B) = new A with B {}
45+
46+
package use:
47+
import lib.{A, B, C, willBeUnused, willBeUsed} //OK
48+
import compiletime.summonInline //OK
49+
50+
transparent inline given conflictInside: C =
51+
summonInline[A]
52+
new {}
53+
54+
transparent inline given potentialConflict: C =
55+
summonInline[B]
56+
new {}
57+
58+
val b: B = summon[B]
59+
val c: C = summon[C]

0 commit comments

Comments
 (0)