Skip to content

Commit 55c759e

Browse files
committed
Test a fallback scheme
1 parent f307da2 commit 55c759e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/run/implied-specifity-2.scala

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,20 @@ implied lo2 given Low for Bam2("lo")
4141
implied mid2 given High given Arg for Bam2("mid")
4242
implied hi2 for Bam2("hi")
4343

44+
class Arg2
4445
class Red(val str: String)
45-
implied normal given Arg for Red("normal")
46-
implied reduced given Arg given Low for Red("reduced")
46+
implied normal given Arg2 for Red("normal")
47+
implied reduced given (ev: Arg2 | Low) for Red("reduced")
4748

4849
object Test extends App {
4950
assert(Foo[Int] == 0)
5051
assert(Foo[Bar[Int]] == 3)
5152
assert(Foo[Bar[Baz]] == 5)
5253
assert(the[Bam].str == "hi")
5354
assert(the[Bam2].str == "hi")
54-
//assert(the[Red].str == "normal")
55+
assert(the[Red].str == "reduced")
56+
57+
{ implied for Arg2
58+
assert(the[Red].str == "normal")
59+
}
5560
}

0 commit comments

Comments
 (0)