diff options
author | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-19 17:07:46 +0100 |
---|---|---|
committer | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-19 17:07:46 +0100 |
commit | 33b0e7b1ab0e71f525c75705dcd91b4b7d9d0994 (patch) | |
tree | d666ced3c08e0745bebb706148abbac56df78c8c /tests/untried/pos/t5156.scala | |
parent | 1dfe6567fee9626106211088e41c4683342ec0f8 (diff) | |
download | dotty-33b0e7b1ab0e71f525c75705dcd91b4b7d9d0994.tar.gz dotty-33b0e7b1ab0e71f525c75705dcd91b4b7d9d0994.tar.bz2 dotty-33b0e7b1ab0e71f525c75705dcd91b4b7d9d0994.zip |
apply srewrite (explicit types for implicits + no procedure syntax
for constructors) to tests/untried/pos
Diffstat (limited to 'tests/untried/pos/t5156.scala')
-rw-r--r-- | tests/untried/pos/t5156.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/untried/pos/t5156.scala b/tests/untried/pos/t5156.scala index 129e97a52..41b1c296e 100644 --- a/tests/untried/pos/t5156.scala +++ b/tests/untried/pos/t5156.scala @@ -6,14 +6,14 @@ object HList { type ::[H, T <: HList] = HCons[H, T] type HNil = HNil.type - implicit def hlistOps[L <: HList](l : L) = new { + implicit def hlistOps[L <: HList](l : L): AnyRef{def ::[H](h: H): HList.::[H,L]; def last(implicit last: HList.Last[L]): Unit} = new { def ::[H](h : H) : H :: L = HCons(h, l) def last(implicit last : Last[L]): Unit = {} } class Last[L <: HList] - implicit def hsingleLast[H] = new Last[H :: HNil] - implicit def hlistLast[H, T <: HList](implicit lt : Last[T]) = new Last[H :: T] + implicit def hsingleLast[H]: HList.Last[HList.::[H,HList.HNil]] = new Last[H :: HNil] + implicit def hlistLast[H, T <: HList](implicit lt : Last[T]): HList.Last[HList.::[H,T]] = new Last[H :: T] type III = Int :: Int :: Int :: HNil val iii : III = 0 :: 0 :: 0 :: HNil |