File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import scala.reflect.ClassTag
4
4
5
5
object Arrays {
6
6
implicit def ArrayIsLiftable [T : Liftable ](implicit t : Type [T ]): Liftable [Array [List [T ]]] = (arr : Array [List [T ]]) => ' {
7
- new Array [List [~ t]](~ ( arr.length: Expr [ Int ]) )
7
+ new Array [List [~ t]](~ arr.length.toExpr )
8
8
// TODO add elements
9
9
}
10
10
}
@@ -13,7 +13,7 @@ object Test {
13
13
def main (args : Array [String ]): Unit = {
14
14
import Arrays ._
15
15
implicit val ct : Expr [ClassTag [Int ]] = '(ClassTag.Int)
16
- val arr : Expr [Array [List [Int ]]] = Array [List [Int ]](List (1 , 2 , 3 ))
16
+ val arr : Expr [Array [List [Int ]]] = Array [List [Int ]](List (1 , 2 , 3 )).toExpr
17
17
println(arr.show)
18
18
}
19
19
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import scala.reflect.ClassTag
4
4
5
5
object Arrays {
6
6
implicit def ArrayIsLiftable [T : Liftable ](implicit t : Type [T ], ct : Expr [ClassTag [T ]]): Liftable [Array [T ]] = (arr : Array [T ]) => ' {
7
- new Array [~ t](~ ( arr.length: Expr [ Int ]) )(~ ct)
7
+ new Array [~ t](~ arr.length.toExpr )(~ ct)
8
8
// TODO add elements
9
9
}
10
10
}
@@ -13,7 +13,7 @@ object Test {
13
13
def main (args : Array [String ]): Unit = {
14
14
import Arrays ._
15
15
implicit val ct : Expr [ClassTag [Int ]] = '(ClassTag.Int)
16
- val arr : Expr [Array [Int ]] = Array [Int ](1 , 2 , 3 )
16
+ val arr : Expr [Array [Int ]] = Array [Int ](1 , 2 , 3 ).toExpr
17
17
println(arr.show)
18
18
}
19
19
}
You can’t perform that action at this time.
0 commit comments