File tree Expand file tree Collapse file tree 1 file changed +22
-12
lines changed Expand file tree Collapse file tree 1 file changed +22
-12
lines changed Original file line number Diff line number Diff line change 11trait Expr [T ]
22trait Liftable [T ]
33
4- /* given autoToExpr[T] as Conversion[T, Expr[T]] given Liftable[T] {
5- def apply(x: T): Expr[T] = ???
6- }
7- */
8- class ToExpr [T ] given Liftable [T ] extends Conversion [T , Expr [T ]] {
9- def apply (x : T ): Expr [T ] = ???
4+ object test1 {
5+ class ToExpr [T ] given Liftable [T ] extends Conversion [T , Expr [T ]] {
6+ def apply (x : T ): Expr [T ] = ???
7+ }
8+ given toExpr [T ] as ToExpr [T ] given Liftable [T ]
9+
10+ given as Liftable [Int ] = ???
11+ given as Liftable [String ] = ???
12+
13+ def x = the[ToExpr [String ]]
14+ def y = the[Conversion [String , Expr [String ]]]
15+
16+ def a : Expr [String ] = " abc"
1017}
11- given toExpr [T ] as ToExpr [T ] given Liftable [T ]
1218
13- given as Liftable [Int ] = ???
14- given as Liftable [String ] = ???
19+ object test2 {
20+
21+ given autoToExpr [T ] as Conversion [T , Expr [T ]] given Liftable [T ] {
22+ def apply (x : T ): Expr [T ] = ???
23+ }
1524
16- def x = the[ ToExpr [ String ]]
17- def y = the[ Conversion [ String , Expr [String ]]]
25+ given as Liftable [ Int ] = ???
26+ given as Liftable [String ] = ???
1827
19- def a : Expr [String ] = " abc"
28+ def a : Expr [String ] = " abc"
29+ }
You can’t perform that action at this time.
0 commit comments