File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 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+
19+ val tp_v : TokenParser [Char , Position [CharSequence ]] = TextParser .TP
20+ val tp_i = the[TokenParser [Char , Position [CharSequence ]]] // error
21+ val co_i = the[Conversion [Char , Position [CharSequence ]]] // error
22+ val co_x : Position [CharSequence ] = 'x' // error
23+
24+ {
25+ implied XXX for Conversion [Char , Position [CharSequence ]] = co_i
26+ val co_y : Position [CharSequence ] = 'x'
27+ }
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments