Skip to content

Commit 936c438

Browse files
committed
Fix #5978: Add regression test
1 parent 40a7d10 commit 936c438

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/pos/i5978.scala

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import scala.language.implicitConversions
2+
3+
opaque type Position[Buffer] = Int
4+
5+
trait TokenParser[Token, R]
6+
7+
object TextParser {
8+
implied TP for TokenParser[Char, Position[CharSequence]] {}
9+
10+
implied FromCharToken
11+
given (T: TokenParser[Char, Position[CharSequence]]) for Conversion[Char, Position[CharSequence]] = ???
12+
}
13+
14+
15+
object Testcase {
16+
def main(args: Array[String]): Unit = {
17+
import TextParser._
18+
import implied TextParser._
19+
20+
val tp_v: TokenParser[Char, Position[CharSequence]] = TextParser.TP
21+
val tp_i = the[TokenParser[Char, Position[CharSequence]]]
22+
val co_i = the[Conversion[Char, Position[CharSequence]]]
23+
val co_x : Position[CharSequence] = 'x'
24+
25+
{
26+
implied XXX for Conversion[Char, Position[CharSequence]] = co_i
27+
val co_y : Position[CharSequence] = 'x'
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)