1-
1+ // This test requires retyping from untyped trees after inlining, which is not supported anymore
22object typelevel {
33 case class Typed [T ](value : T ) { type Type = T }
44}
@@ -21,7 +21,7 @@ object Test extends App {
2121 type HNil = HNil .type
2222 type Z = Z .type
2323
24- inline def ToNat (inline n : Int ): Typed [Nat ] =
24+ inline def ToNat (inline n : Int ) < : Typed [Nat ] =
2525 if n == 0 then Typed (Z )
2626 else Typed (S (ToNat (n - 1 ).value))
2727
@@ -35,7 +35,7 @@ object Test extends App {
3535 println(x1)
3636 println(x2)
3737
38- inline def toInt (n : Nat ): Int = inline n match {
38+ inline def toInt (n : Nat ) < : Int = inline n match {
3939 case Z => 0
4040 case S (n1) => toInt(n1) + 1
4141 }
@@ -45,7 +45,7 @@ object Test extends App {
4545 inline val i2 = toInt(y2)
4646 val j2 : 2 = i2
4747
48- inline def concat (xs : HList , ys : HList ): HList = inline xs match {
48+ inline def concat (xs : HList , ys : HList ) < : HList = inline xs match {
4949 case HNil => ys
5050 case HCons (x, xs1) => HCons (x, concat(xs1, ys))
5151 }
@@ -68,7 +68,7 @@ object Test extends App {
6868 val r6 = concat(HCons (1 , HCons (" a" , HNil )), HCons (true , HCons (1.0 , HNil )))
6969 val c6 : HCons [Int , HCons [String , HCons [Boolean , HCons [Double , HNil ]]]] = r6
7070
71- inline def nth (xs : HList , n : Int ): Any = inline xs match {
71+ inline def nth (xs : HList , n : Int ) < : Any = inline xs match {
7272 case HCons (x, _) if n == 0 => x
7373 case HCons (_, xs1) if n > 0 => nth(xs1, n - 1 )
7474 }
@@ -78,12 +78,12 @@ object Test extends App {
7878 val e1 = nth(r2, 1 )
7979 val ce1 : String = e1
8080
81- inline def concatTyped (xs : HList , ys : HList ): Typed [_ <: HList ] = inline xs match {
81+ inline def concatTyped (xs : HList , ys : HList ) < : Typed [_ <: HList ] = inline xs match {
8282 case HNil => Typed (ys)
8383 case HCons (x, xs1) => Typed (HCons (x, concatTyped(xs1, ys).value))
8484 }
8585
86- def concatImpl (xs : HList , ys : HList ): HList = xs match {
86+ def concatImpl (xs : HList , ys : HList ) < : HList = xs match {
8787 case HNil => ys
8888 case HCons (x, xs1) => HCons (x, concatImpl(xs1, ys))
8989 }
0 commit comments